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

Renderer for OpenGL. More...

#include <OpenGL.h>

Inheritance diagram for Gwk::Renderer::OpenGL:
Gwk::Renderer::Base Gwk::Renderer::OpenGL_DebugFont

Classes

struct  Vertex
 

Public Member Functions

 OpenGL (ResourceLoader &loader, const Gwk::Rect &viewRect)
 
void Init () override
 
void Begin () override
 
void End () override
 
void SetDrawColor (Gwk::Color color) override
 Set the current drawing color.
 
void DrawFilledRect (Gwk::Rect rect) override
 Draw a filled rectangle using the current color.
 
void StartClip () override
 Start clipping the drawing. More...
 
void EndClip () override
 Stop clipping the drawing.
 
void DrawTexturedRect (Gwk::Texture *texture, Gwk::Rect targetRect, float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f) override
 
Gwk::Color PixelColor (Gwk::Texture *texture, unsigned int x, unsigned int y, const Gwk::Color &col_default) override
 
void RenderText (Gwk::Font *font, Gwk::Point pos, const Gwk::String &text) override
 
Gwk::Point MeasureText (Gwk::Font *font, const Gwk::String &text) override
 
bool InitializeContext (Gwk::WindowProvider *window) override
 
bool ShutdownContext (Gwk::WindowProvider *window) override
 
bool PresentContext (Gwk::WindowProvider *window) override
 
bool ResizedContext (Gwk::WindowProvider *window, int w, int h) override
 
bool BeginContext (Gwk::WindowProvider *window) override
 
bool EndContext (Gwk::WindowProvider *window) override
 
- Public Member Functions inherited from Gwk::Renderer::Base
ResourceLoaderGetLoader ()
 Get ResourceLoader we are using for the renderer.
 
void SetClipRegion (Gwk::Rect const &rect)
 
void AddClipRegion (Gwk::Rect rect)
 
bool ClipRegionVisible ()
 
const Gwk::RectClipRegion () const
 
virtual void DrawMissingImage (Gwk::Rect targetRect)
 
virtual ICacheToTextureGetCTT ()
 
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
 

Public Attributes

void * m_context
 

Protected Member Functions

void Flush ()
 
void AddVert (int x, int y, float u=0.0f, float v=0.0f)
 
- Protected Member Functions inherited from Gwk::Renderer::Base
 Base (ResourceLoader &loader)
 Constructor. Not public as we only instance derived implementations.
 
bool EnsureFont (Font &font)
 

Protected Attributes

Rect m_viewRect
 
Color m_color
 
int m_vertNum
 
Vertex m_vertices [MaxVerts]
 
- Protected Attributes inherited from Gwk::Renderer::Base
float m_fScale
 

Static Protected Attributes

static const int MaxVerts = 1024
 

Detailed Description

Renderer for OpenGL.


Class Documentation

◆ Gwk::Renderer::OpenGL::Vertex

struct Gwk::Renderer::OpenGL::Vertex
Class Members
unsigned char a
unsigned char b
unsigned char g
unsigned char r
float u
float v
float x
float y
float z

Member Function Documentation

◆ StartClip()

void Gwk::Renderer::OpenGL::StartClip ( )
overridevirtual

Start clipping the drawing.

See also
SetClipRegion().

Reimplemented from Gwk::Renderer::Base.


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