| Gwork: 0.3.0Dev |
Base class for all renderer implementations. More...
#include <BaseRender.h>
Public Member Functions | |
| virtual void | Init () |
| virtual void | Begin () |
| virtual void | End () |
| ResourceLoader & | GetLoader () |
| Get ResourceLoader we are using for the renderer. | |
| virtual void | SetDrawColor (Color color) |
| Set the current drawing color. | |
| virtual void | StartClip () |
| Start clipping the drawing. More... | |
| virtual void | EndClip () |
| Stop clipping the drawing. | |
| void | SetClipRegion (Gwk::Rect const &rect) |
| void | AddClipRegion (Gwk::Rect rect) |
| bool | ClipRegionVisible () |
| const Gwk::Rect & | ClipRegion () const |
| virtual void | DrawFilledRect (Gwk::Rect rect) |
| Draw a filled rectangle using the current color. | |
| virtual void | DrawTexturedRect (Gwk::Texture *texture, Gwk::Rect targetRect, float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f) |
| virtual void | DrawMissingImage (Gwk::Rect targetRect) |
| virtual Gwk::Color | PixelColor (Gwk::Texture *texture, unsigned int x, unsigned int y, const Gwk::Color &col_default=Gwk::Colors::White) |
| virtual ICacheToTexture * | GetCTT () |
| virtual void | RenderText (Gwk::Font *font, Gwk::Point pos, const Gwk::String &text) |
| virtual Gwk::Point | MeasureText (Gwk::Font *font, const Gwk::String &text) |
| virtual void | DrawLinedRect (Gwk::Rect rect) |
| virtual void | DrawPixel (int x, int y) |
| virtual void | DrawShavedCornerRect (Gwk::Rect rect, bool bSlight=false) |
| void | Translate (int &x, int &y) |
| void | Translate (Gwk::Rect &rect) |
| void | SetRenderOffset (const Gwk::Point &offset) |
| Set the rendering offset. You shouldn't have to touch these, ever. | |
| void | AddRenderOffset (const Gwk::Rect &offset) |
| const Gwk::Point & | GetRenderOffset () const |
| void | SetScale (float fScale) |
| float | Scale () const |
| virtual bool | InitializeContext (Gwk::WindowProvider *window) |
| virtual bool | ShutdownContext (Gwk::WindowProvider *window) |
| virtual bool | ResizedContext (Gwk::WindowProvider *window, int w, int h) |
| virtual bool | BeginContext (Gwk::WindowProvider *window) |
| virtual bool | EndContext (Gwk::WindowProvider *window) |
| virtual bool | PresentContext (Gwk::WindowProvider *window) |
Protected Member Functions | |
| Base (ResourceLoader &loader) | |
| Constructor. Not public as we only instance derived implementations. | |
| bool | EnsureFont (Font &font) |
Protected Attributes | |
| float | m_fScale |
Base class for all renderer implementations.
Each renderer implements this functionality so that the skin can draw the GUI.
|
virtual |
"\name Render Specialisation" No need to implement these functions in your derived class, but if you can do them faster than the default implementation it's a good idea to.
Reimplemented in Gwk::Renderer::SFML2, Gwk::Renderer::Software, Gwk::Renderer::Irrlicht, Gwk::Renderer::SDL2, and Gwk::Renderer::Allegro.
|
inlinevirtual |
Start clipping the drawing.
Reimplemented in Gwk::Renderer::SFML2, Gwk::Renderer::DirectX11, Gwk::Renderer::Software, Gwk::Renderer::SDL2, Gwk::Renderer::Irrlicht, Gwk::Renderer::Allegro, Gwk::Renderer::OpenGL, Gwk::Renderer::DirectX9, and Gwk::Renderer::OpenGLCore.
| void Gwk::Renderer::Base::Translate | ( | int & | x, |
| int & | y | ||
| ) |
"\name Translate" Translate a panel's local drawing coordinate into view space, taking Offsets into account.