class MASKING_DLL_DECLSPEC DRS
The Dirty Rectangle Syste (DRS) screen update driver.
Inheritance:
Public Methods
-
void Redraw()
- Paints the screen by going through the dirty rectangles list, blitting them to the screen and removing them from the list
-
bool RequiresFullRedraw()
- DRS obviously doesn't require the screen to be redrawn every frame so this functions returns false
-
void InvalidateRect(const Rect& r)
- Attempts to add a rectangle to the dirty rectangles list.
Protected Fields
-
std::list<Rect> rectlist
- The actual list of dirty rectangles
Protected Methods
-
Rect* CanAdd(const Rect& r)
- Checks whether a rectangle can safely be added to the dirty list without inducing overdraw.
Documentation
The Dirty Rectangle Syste (DRS) screen update driver.
DRS is similar to normal double buffering except that it doesn't blit the
entire buffer to the screen every frame but instead keeps a list of rectangles
that have been chaged since the last update (dirty rectangles) and only
blits them. This means that when only a small portion of the screen changes
there is little or no overdaraw which in turn means that for applications where
most of the screen is static most of the time (like most utility programs,
editors, etc.) this is by far the fastest screen update method often producing
thousands of "frames" per second. However when large portions of the screen
or even the entire screen is updated all the time (like in most games) this
driver is no faster than regular double buffering. In fact it might even be
very slightly slower.
std::list<Rect> rectlist
-
The actual list of dirty rectangles
Rect* CanAdd(const Rect& r)
-
Checks whether a rectangle can safely be added to the dirty list
without inducing overdraw. It returns a pointer to the rectangle that
is in the way of the recatangle being added if it finds one, NULL
otherwise.
void Redraw()
-
Paints the screen
by going through the dirty rectangles list, blitting them to the screen
and removing them from the list
bool RequiresFullRedraw()
-
DRS obviously doesn't require the screen to be redrawn every frame
so this functions returns false
void InvalidateRect(const Rect& r)
-
Attempts to add a rectangle to the dirty rectangles list.
If there is already another rectangle in the way it splits the rectangle
being added into smaller rectangles and recursively invalidates them
instead thus preventing parts of the screen to be drawn more than once.
- Direct child classes:
- GLDriverDRS
Alphabetic index Hierarchy of classes
Back to front page
|
page generated with DOC++