Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


CaptainStiggz

Member Since 13 Sep 2011
Offline Last Active Sep 20 2011 03:50 PM

Topics I've Started

Loading OpenGL textures in Windows from JPG

13 September 2011 - 05:37 PM

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

PARTNERS