Advertisement

what is a dirty rectangle anyway?

Started by January 25, 2003 07:37 PM
2 comments, last by Drakex 21 years, 9 months ago
i keep seeing this, what is it? ---------------------------- hey, i know how to use DX8 now! sort of.. well i''ve got the object loading, rotation, positioning, camera, text and lights down... now for input and sound.
_______________________________________________________________________Hoo-rah.
I don''t think we''re really allowed to talk about that kind of rectangle here

Dirty Rectangles are basically a method where you only update certain parts of the screen. For instance say you have a static background and you are moving a cursor around. Obviously the only thing changing is the place where the cursor was in the last frame and where it will be in the new frame. Rather than redrawing the entire screen each frame you define two rectangles (one where the cursor was, one where you want it to be), and call them "dirty" (they have information that is no longer correct). You then redraw only the directy rectangles, rather then the whole screen.
Advertisement
quote: Original post by Michalson
I don''t think we''re really allowed to talk about that kind of rectangle here

Dirty Rectangles are basically a method where you only update certain parts of the screen. For instance say you have a static background and you are moving a cursor around. Obviously the only thing changing is the place where the cursor was in the last frame and where it will be in the new frame. Rather than redrawing the entire screen each frame you define two rectangles (one where the cursor was, one where you want it to be), and call them "dirty" (they have information that is no longer correct). You then redraw only the directy rectangles, rather then the whole screen.

conclusion: dirty rectangles are zones that needs to be updated.

KaMiKaZe
ah has to do with blitting. kept seeing this in the SDL documentation, now i know why, thanks.

__________________________________________
you just think i''m here. i''m really not.
_______________________________________________________________________Hoo-rah.

This topic is closed to new replies.

Advertisement