Jump to content
  • Advertisement
Sign in to follow this  
John_Idol

How to load bmp into GLubyte array?

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

All, I am trying to load up a bmp file into a GLubyte array (without using aux). I thought it was a trivial task but is sucking up hours of my time. Can't seem to find anything on Google either. I found this post: http://www.gamedev.net/community/forums/topic.asp?topic_id=188400 here on GameDev but it work only for 24:8 bitmaps. So I converted my bmp to 24 bpp but it still won't work (error reading image data). Any help would appreciated! Cheers

Share this post


Link to post
Share on other sites
Advertisement
Can you post your code where you read the bitmap file? Without it, we won't be able to pin point any problems.

If you are going to load other types of images, I would recommend using an image loading library. The 2 main ones I know of are DevIL and SOIL. I recently used DevIL and its really good. The API for it is very similar to OpenGL's API (the functions begin with "il" like OpenGL functions start with "gl").

Share this post


Link to post
Share on other sites
Hi - thanks.

I am trying to use the code from the GameDev post I refer to above (I copy-pasted it).

I'll check-out the libraries, thanks for pointing that out.

Cheers

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!