Jump to content
  • Advertisement

Archived

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

Guest Anonymous Poster

Dirty Rectangles

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

You can use minimal requared area, i.e. use one rectangle that will cover the area that was modifyed. (good if you modify something only in one part of the screen)

Try to merge rectangles that are close to each other.

------------------
FlyFire/CodeX
http://codexorg.webjump.com

Share this post


Link to post
Share on other sites
Advertisement
Thats why on a dirty rectangle system you generaly just have a maxium amount of rectangles if it gets to high just redraw th entire screen,and clear your list.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Does anyone have any good algorithms for managing dirty rectangles?

Let me say what I've already got. I already have code to manage the EXACT list of dirty rectangles. The potential problem is that the list can get too long, and it's not worth the time managing this for the time saved in reducing the pixels bltted.

What I'd really like to see is an algorithm that might blt some unnecessary pixels, but the number of rectangles bltted is much smaller, and the management is not computationally intensive.

Also, something that pays attention to 32-bit boundaries is important, because bltting from an odd pixel is a performance hit.

So, are there any suggestions or pointers?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!