Gwork: 0.3.0Dev
Gwk::Renderer::Base Class Reference

Base class for all renderer implementations. More...

#include <BaseRender.h>

Inheritance diagram for Gwk::Renderer::Base:
Gwk::Renderer::Allegro Gwk::Renderer::DirectX11 Gwk::Renderer::DirectX9 Gwk::Renderer::Irrlicht Gwk::Renderer::Null Gwk::Renderer::OpenGL Gwk::Renderer::OpenGLCore Gwk::Renderer::SDL2 Gwk::Renderer::SFML2 Gwk::Renderer::Software

Public Member Functions

virtual void Init ()
 
virtual void Begin ()
 
virtual void End ()
 
ResourceLoaderGetLoader ()
 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::RectClipRegion () 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 ICacheToTextureGetCTT ()
 
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::PointGetRenderOffset () 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
 

Detailed Description

Base class for all renderer implementations.

Each renderer implements this functionality so that the skin can draw the GUI.

Note
We never instance this directly, only the derived implementations.

Member Function Documentation

◆ DrawLinedRect()

virtual void Gwk::Renderer::Base::DrawLinedRect ( Gwk::Rect  rect)
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.

◆ StartClip()

virtual void Gwk::Renderer::Base::StartClip ( )
inlinevirtual

◆ Translate()

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.


The documentation for this class was generated from the following file: