Jump to content

  • Log In with Google      Sign In   
  • Create Account


glut: can not find tga file.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 nickme   Members   -  Reputation: 205

Like
0Likes
Like

Posted 17 January 2012 - 09:20 PM

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

Sponsor:

#2 nickme   Members   -  Reputation: 205

Like
0Likes
Like

Posted 17 January 2012 - 09:24 PM

hi,
i just want to add that i was getting the source of gltReadTGABits() from superBible 5th.

#3 Micha3L   Members   -  Reputation: 100

Like
0Likes
Like

Posted 17 January 2012 - 09:53 PM

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.

#4 Hodgman   Moderators   -  Reputation: 29759

Like
1Likes
Like

Posted 17 January 2012 - 10:14 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.

#5 nickme   Members   -  Reputation: 205

Like
0Likes
Like

Posted 18 January 2012 - 11:46 AM

hi hodgman:

the wikipedia is dark today, i will look at it tomorrow.
thanks

#6 nickme   Members   -  Reputation: 205

Like
0Likes
Like

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 Micha3L   Members   -  Reputation: 100

Like
0Likes
Like

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.

#8 nickme   Members   -  Reputation: 205

Like
0Likes
Like

Posted 23 January 2012 - 06:44 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS