• Advertisement

Archived

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

Dirty Rectangles

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

Advertisement
Dirty Rectangles, is when you copy whatever is behind the sprite you are drawing into safe memory, so you can draw back it back later on. This way you don''t have to render the background over and over again, and speeds things up a little (not always).

here is pseudo code:

drawDirtyRectanglesOnTheScreen()

move sprite and stuff

copyDirtyRectanglesFromScreenToSafeMemory()
drawSpriteOnScreen()


Dirty Rectangles -
A method of updating only the changed parts of the screen. The screen is divided up into rectangles and only rectangles that have changes are makred "dirty" and then are redrawn to clean them up. Increases drawing speed as less is drawn.

btw, here''s an article that explains it pretty well: dirty rectangles

Share this post


Link to post
Share on other sites

  • Advertisement