Jump to content
  • Advertisement


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


weird texture problem (SDL)

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

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!