|
| BaseRenderOSystem (BaseGame *inGame) |
|
Common::String | getName () const override |
|
bool | initRenderer (int width, int height, bool windowed) override |
|
bool | flip () override |
|
bool | indicatorFlip (int32 x, int32 y, int32 width, int32 height) override |
|
bool | forcedFlip () override |
|
bool | clear () override |
|
Graphics::PixelFormat | getPixelFormat () const override |
|
void | fade (uint16 alpha) override |
|
void | fadeToColor (byte r, byte g, byte b, byte a) override |
|
bool | fillRect (int x, int y, int w, int h, uint32 color) override |
|
BaseImage * | takeScreenshot (int newWidth=0, int newHeight=0) override |
|
void | onWindowChange () override |
|
void | setWindowed (bool windowed) override |
|
void | invalidateTicket (RenderTicket *renderTicket) |
|
void | invalidateTicketsFromSurface (BaseSurfaceOSystem *surf) |
|
void | drawFromTicket (RenderTicket *renderTicket) |
|
void | drawFromQueuedTicket (const RenderQueueIterator &ticket) |
|
bool | setViewport (int left, int top, int right, int bottom) override |
|
bool | setViewport (Common::Rect32 *rect) override |
|
void | modTargetRect (Common::Rect *rect) |
|
void | pointFromScreen (Common::Point32 *point) |
|
void | pointToScreen (Common::Point32 *point) |
|
float | getScaleRatioX () const override |
|
float | getScaleRatioY () const override |
|
bool | startSpriteBatch () override |
|
bool | endSpriteBatch () override |
|
void | endSaveLoad () override |
|
void | drawSurface (BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Graphics::TransformStruct &transform) |
|
BaseSurface * | createSurface () override |
|
void | dumpData (const char *filename) |
|
virtual bool | setScreenViewport () |
|
| BaseRenderer (BaseGame *inGame=nullptr) |
|
virtual bool | setProjection () |
|
virtual bool | windowedBlt () |
|
virtual void | initLoop () |
|
virtual bool | setup2D (bool force=false) |
|
virtual bool | displayDebugInfo () |
|
virtual bool | drawShaderQuad () |
|
bool | clipCursor () |
|
bool | unclipCursor () |
|
BaseObject * | getObjectAt (int x, int y) |
|
void | deleteRectList () |
|
bool | pointInViewport (Common::Point32 *P) |
|
bool | isReady () const |
|
bool | isWindowed () const |
|
int32 | getBPP () const |
|
int32 | getWidth () const |
|
int32 | getHeight () const |
|
bool | setEditorProp (const Common::String &propName, const Common::String &propValue) |
|
Common::String | getEditorProp (const Common::String &propName, const Common::String &initVal=Common::String()) |
|
| BaseClass (TDynamicConstructor, TDynamicConstructor) |
|
bool | parseEditorProperty (char *buffer, bool complete=true) |
|
virtual bool | saveAsText (BaseDynamicBuffer *buffer, int indent=0) |
|
| BaseClass (BaseGame *GameOwner) |
|
virtual const char * | getClassName () |
|
virtual bool | persist (BasePersistenceManager *persistMgr) |
|
A 2D-renderer implementation for WME. This renderer makes use of a "ticket"-system, where all draw-calls are stored as tickets until flip() is called, and compared against the tickets from last frame, to determine which calls were the same as last round (i.e. in the exact same order, with the exact same arguments), and thus figure out which parts of the screen need to be redrawn.
Important concepts to handle here, is the ordered number of any ticket which is called the "drawNum", every frame this starts from scratch, and then the incoming tickets created from the draw-calls are checked to see whether they came before, on, or after the drawNum they had last frame. Everything else being equal, this information is then used to check whether the draw order changed, which will then create a need for redrawing, as we draw with an alpha-channel here.
There is also a draw path that draws without tickets, for debugging purposes, as well as to accommodate situations with large enough amounts of draw calls, that there will be too much overhead involved with comparing the generated tickets.