Using sections of a bitmap with OGL

Started by
2 comments, last by drdarkon 21 years, 8 months ago
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
Thanks
Advertisement
Texture coordinates.

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
Thanks
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.

This topic is closed to new replies.

Advertisement