Archived

This topic is now archived and is closed to further replies.

weird texture problem (SDL)

This topic is 4955 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

when trying lesson06 from the nehe tutorials, when loading teh texture with SDl, for some reason it returns an null pointer to a SDL_Surface. for example: SDL_LoadBMP("data/nehe.bmp"); returns NULL when I run the program in GUI mode (clicking it in a file browser, Konqueror) but works perfectly when running it in a terminal. The example (Linux/SDL one) has the sample probem except that it does not check wether initGL failed due to a failed LoadBMP so it draws a white cube. Is there any way to solve this?

Share this post


Link to post
Share on other sites
thats just it.
SDL doesnt spit anything out.
the working path is:
lesson06/lesson06 --> binary
/data/nehe.bmp
so I have navigated in lesson06 with konqueror and when I double click on the file the program runs and exits immediatly due to my if {}. I made sure to output an error message to a file (error.log) if the initGL failed but that didnt happen either but yet I know it failed because the code uploaded in the Nehe tutorial pages has the same problem.

and the weirdest thing of all is:
if initGL failed, then there would be an error in the log but ...
there isnt. no log file either.
(note that I added the log file thing after I noticed this bug)

[edited by - incubator01 on May 19, 2004 3:36:40 PM]

Share this post


Link to post
Share on other sites