glut: can not find tga file.
#1 Members - Reputation: 193
Posted 17 January 2012 - 09:20 PM
i tried to load a TGA files from my harddisk but the gltReadTGABits() always return NULL. i tried to copy the TGA file next to where the source file is and copy it to the debug folder(i was in the debug mode), i check and recheck the file name, but it still return NULL. does anybody have any idea what i should check again? i
thanks
#4 Moderators - Reputation: 13569
Posted 17 January 2012 - 10:14 PM
Any file paths that you use in your program will be relative to this working directory.
#6 Members - Reputation: 193
Posted 18 January 2012 - 08:12 PM
When you launch from your IDE, it will set the working directory to a particular path (which you can configure in your IDE's debugging properties).
Any file paths that you use in your program will be relative to this working directory.
hi,
i checked the project property and found that the working directory is $(ProjectDir). it should be OK, right? is there a way to peek at what $(ProjectDir) represent?
thanks
#7 Members - Reputation: 100
Posted 20 January 2012 - 10:11 PM
When you launch from your IDE, it will set the working directory to a particular path (which you can configure in your IDE's debugging properties).
Any file paths that you use in your program will be relative to this working directory.
hi,
i checked the project property and found that the working directory is $(ProjectDir). it should be OK, right? is there a way to peek at what $(ProjectDir) represent?
thanks
The ProjectDirectory is where your code files are, not where the final .exe file is. Make sure that the .tga and .exe files are in the same place, and then try launching the exe NOT from the IDE, but from Explorer.






