🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Dirty Rectangles

Started by
1 comment, last by GameDev.net 24 years, 9 months ago
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

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

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.

This topic is closed to new replies.

Advertisement