Archived

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

drdarkon

Using sections of a bitmap with OGL

Recommended Posts

Hey everyone, I am working on a 2d game rendering engine in OpenGL. I am pretty familiar with DirectX and Direct Draw etc... but not with OGL. Here is my question: How would I go about only taking certain parts of a bitmap? In DirectDraw, Blt has a Sourcerect where you define what part of the BMP to draw. With OpenGL since all my frames will be stored as textures I am wondering how I would take just part of a bitmap and turn it into a texture? What is the best (or any) way to do this? - Thanks - Jesse

Share this post


Link to post
Share on other sites
Ahhhh okay..

So would the best thing to do be to use the bitmap to create individual textures or to just have one big texture where I draw only parts of the texture... could you eloborate a bit?

- Thanks

Share this post


Link to post
Share on other sites
quote:
Original post by drdarkon
So would the best thing to do be to use the bitmap to create individual textures or to just have one big texture where I draw only parts of the texture... could you eloborate a bit?

One texture will be faster than multiple textures in all but a few situations. However, you have to worry about the maximum texture size that a video card can handle.

Share this post


Link to post
Share on other sites