Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cerberus

OpenGL OpenGL and bitmaps

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

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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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