OpenGL and bitmaps

Started by
0 comments, last by cerberus 24 years, 7 months ago
I have a pretty good understanding of how to display a "power of 2" (256x256, etc) texture...but what if I want to just display a 800x600 background bitmap? Loading a bitmap is no problem...just displaying it is givin me a headache. Is there any reasonable way to do this in opengl, or am I stuck with the GDI? Can opengl and the gdi work on the same rendering context? Thanks in advance!
Advertisement
The answer is to cut up your background bitmap into multiple 256x256 (every card I've heard of can handle this size - newer ones can handle larger textures) textures and draw them all as multiple textured quads.

Alternatively you can draw your backdrop using glDrawPixels, however under hardware renderers this is something like 20 times slower than the above method.

l8r
Ryan

------------------
--
Ryan Haksi
cryogen@infoserve.net
http://members.home.com/borealis/ryan.html

--
Ryan Haksi
cryogen@infoserve.net
http://members.home.com/borealis/ryan.html

This topic is closed to new replies.

Advertisement