OpenGL used for bitmap loading?

Started by
3 comments, last by MARS_999 22 years, 8 months ago
Ok, I am using OpenGL to try and load a bitmap file for a screen background into a win32 window. I will not be running in fullscreen mode either. Is their a function that will just load up the bitmap file? If not could someone please help out with a code example of how to display a bitmap. Now when I have this bitmap displayed can I still use win32 gpx calls like lineto moveto? Or does OpenGL have functions that are like those in win32 to draw simple lines and rectangles? Thanks Please forgive me! =)
Advertisement
well, you''ll have to either write your own loader, use a library like the auxilary library which is in gluax.lib, or steal someone else''s code.


Never underestimante the power of stupid people in large groups.
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Thanks!

Please forgive me! =)
You might consider using DevIL (formerly known as OpenIL). Not only will it load many image formats, but it also has functions for creating OpenGL textures from those images with a single function.

If you do end up using something like DevIL, I highly recommend using a format other than Windows Bitmap. If the images need no alpha channel, use high-quality JPEG, otherwise use Targa.
Thanks for the info merlin!

Please forgive me! =)

This topic is closed to new replies.

Advertisement