Jump to content
  • Advertisement
Sign in to follow this  
nickme

glut: can not find tga file.

This topic is 2519 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi
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

Share this post


Link to post
Share on other sites
Advertisement
You say you are in debug mode, does that mean launching the application from your IDE (eg Visual Studio, Code::Blocks)? If you do, try launching it from the folder the executable is in.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

[quote name='Hodgman' timestamp='1326860046' post='4903881']
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
[/quote]

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.

Share this post


Link to post
Share on other sites
hi
thanks for the help. as it turned out the original tga file that i created was in compressed format. after i found that out, i changed the format, now it run as expected.

thanks again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!