Issues with loading images as textures (XCODE SFML C++)

  • GeoTDCH
    Likes 0

    Problem Description

    I have the cross platform setup that you showed in one of your videos for my frogger project, as i work with mac at home and windows at university, and I am having issues with the program not being able to locate the picture file ever. where would you say i should put all of my textures to allow for the program to be able to locate the image?

  • Sonar Systems admin
    Likes 0

    I would recommend creating a folder called res and put images inside of it. Put the res folder where the code files are.


    This reply has been verified.
  • GeoTDCH
    Likes 0

    i did make a folder called res and put my images in it and put it where the code files are but it didnt work

     

  • Sonar Systems admin
    Likes 0

    What code did you use to use the images?


    This reply has been verified.
  • GeoTDCH
    Likes 0

    if (!texture.loadFromFile("Frogger SFML/res/img/car.png"))

        {

            cout << "Load Failed"<< endl;

            system("pause");

        }

  • Sonar Systems admin
    Likes 0

    Can you show me screenshots of the project directory

Login to reply