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

Renderer for DirectX9. More...

#include <DirectX9.h>

Inheritance diagram for Gwk::Renderer::DirectX9:
Gwk::Renderer::Base

Classes

struct  VertexFormat
 

Public Member Functions

 DirectX9 (IDirect3DDevice9 *device=nullptr)
 
virtual void Begin ()
 
virtual void End ()
 
virtual void Release ()
 
virtual void SetDrawColor (Gwk::Color color)
 Set the current drawing color.
 
virtual void DrawFilledRect (Gwk::Rect rect)
 Draw a filled rectangle using the current color.
 
virtual void LoadFont (Gwk::Font *font)
 
virtual void FreeFont (Gwk::Font *font)
 
virtual void RenderText (Gwk::Font *font, Gwk::Point pos, const Gwk::String &text)
 
virtual Gwk::Point MeasureText (Gwk::Font *font, const Gwk::String &text)
 
void StartClip ()
 Start clipping the drawing. More...
 
void EndClip ()
 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)
 
void LoadTexture (Gwk::Texture *texture)
 
void FreeTexture (Gwk::Texture *texture)
 
Gwk::Color PixelColor (Gwk::Texture *texture, unsigned int x, unsigned int y, const Gwk::Color &col_default)
 
virtual bool InitializeContext (Gwk::WindowProvider *window)
 
virtual bool ShutdownContext (Gwk::WindowProvider *window)
 
virtual bool PresentContext (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)
 
- Public Member Functions inherited from Gwk::Renderer::Base
virtual void Init ()
 
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
 

Protected Member Functions

virtual void FillPresentParameters (Gwk::WindowProvider *window, D3DPRESENT_PARAMETERS &Params)
 
void Flush ()
 
void AddVert (int x, int y)
 
void AddVert (int x, int y, float u, float v)
 
- 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

void * m_currentTexture
 
IDirect3DDevice9 * m_device
 
IDirect3D9 * m_D3D
 
DWORD m_color
 
Gwk::Font::List m_fontList
 
VertexFormat m_verts [MaxVerts]
 
int m_vertNum
 
- Protected Attributes inherited from Gwk::Renderer::Base
float m_fScale
 

Static Protected Attributes

static const int MaxVerts = 1024
 

Detailed Description

Renderer for DirectX9.


Class Documentation

◆ Gwk::Renderer::DirectX9::VertexFormat

struct Gwk::Renderer::DirectX9::VertexFormat
Class Members
DWORD color
FLOAT rhw
float u
float v
FLOAT x
FLOAT y
FLOAT z

Member Function Documentation

◆ StartClip()

void Gwk::Renderer::DirectX9::StartClip ( )
virtual

Start clipping the drawing.

See also
SetClipRegion().

Reimplemented from Gwk::Renderer::Base.


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