Jump to content
  • Advertisement

Archived

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

drdarkon

Using sections of a bitmap with OGL

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

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!