Archived

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

Menu

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

Here is what I do. I make a quad that is rendered in ortho mode. I have one texture that I use on the quad.

On the side I have two images, the first has the menu with transparency (A), that is my base menu. I also have another texture with all my buttons text etc... (B)

What I do is A to my texture, and blit on all the buttons etc... from B. If a button is pressed, I blit the pressed button from A into the appropriate rectangle.

But say you render something dynamic, or with transparency etc... If you simply blit on your texture you will see the previous modifications. So if you want to blit to some rect R on your texture, first blit from A using rect R, and then blit from B. This covers up your dirty region with the original menu, and then alows you to replace your button, etc...

You will want to only modify what changes, and only when you need it, as blitting takes a long time if you did it every frame.

Share this post


Link to post
Share on other sites