Jump to content
  • Advertisement
Sign in to follow this  
ZachStiggelbout

Loading OpenGL textures in Windows from JPG

This topic is 2574 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'm trying to load a jpg image into an OpenGL texture and having a miserable time of it. I'm using visual studio 2010, windows 7, so it's a real bastard to try and use most of the image libraries which provide this functionality. I've been trying to use the method described here:

http://nehe.gamedev...._loading/18007/

I'm able to get it to work in the example VS project provided, but can't figure out why it won't work in my own code. It's failing at this step:

hbmpTemp = CreateDIBSection(hdcTemp, &bi, DIB_RGB_COLORS, (void**)&pBits, 0, 0);

But there is no error message, it just doesn't work, making it tricky to debug. Any ideas?

Thanks,
Zach

Share this post


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

  • 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!