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

Renderer for DirectX11. More...

#include <DirectX11.h>

Inheritance diagram for Gwk::Renderer::DirectX11:
Gwk::Renderer::Base

Classes

class  VertexBuffer
 
struct  VertexFormat
 

Public Member Functions

 DirectX11 (ResourceLoader &loader, ID3D11Device *pDevice=nullptr)
 
virtual void Init ()
 
virtual void Begin ()
 
virtual void End ()
 
virtual void Release ()
 
void SetDrawColor (Gwk::Color color) final
 Set the current drawing color.
 
void DrawFilledRect (Gwk::Rect rect) final
 Draw a filled rectangle using the current color.
 
void RenderText (Gwk::Font *pFont, Gwk::Point pos, const Gwk::String &text) final
 
Gwk::Point MeasureText (Gwk::Font *pFont, const Gwk::String &text) final
 
void StartClip ()
 Start clipping the drawing. More...
 
void EndClip ()
 Stop clipping the drawing.
 
void DrawTexturedRect (Gwk::Texture *pTexture, Gwk::Rect pTargetRect, float u1=0.0f, float v1=0.0f, float u2=1.0f, float v2=1.0f) final
 
Gwk::Color PixelColor (Gwk::Texture *pTexture, unsigned int x, unsigned int y, const Gwk::Color &col_default) final
 
- 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
 
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

void Flush ()
 
void Present ()
 
- 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

FLOAT width
 
FLOAT height
 
FLOAT scalex
 
FLOAT scaley
 
DWORD m_Color
 
bool m_Valid
 
ID3D11Device * m_pDevice
 
IDXGISwapChain * m_pSwapChain
 
ID3D11PixelShader * m_pPixShader
 
ID3D11PixelShader * m_pTexPixShader
 
ID3D11VertexShader * m_pVertShader
 
ID3D11DeviceContext * m_pContext
 
ID3D11BlendState * m_pBlendState
 
ID3D11InputLayout * m_pInputLayout
 
ID3D11RasterizerState * m_pRastState
 
ID3D11ShaderResourceView * m_pCurrentTexture
 
ID3D11BlendState * m_pUILastBlendState
 
float m_LastBlendFactor [4]
 
UINT m_LastBlendMask
 
UINT m_LastStencilRef
 
ID3D11InputLayout * m_LastInputLayout
 
D3D11_PRIMITIVE_TOPOLOGY m_LastTopology
 
ID3D11Buffer * m_LastBuffers [8]
 
UINT m_LastStrides [8]
 
UINT m_LastOffsets [8]
 
ID3D11PixelShader * m_LastPSShader
 
ID3D11VertexShader * m_LastVSShader
 
ID3D11GeometryShader * m_LastGSShader
 
ID3D11ShaderResourceView * m_pLastTexture [8]
 
ID3D11DepthStencilState * m_LastDepthState
 
ID3D11RasterizerState * m_pUILastRasterizerState
 
D3D11_RECT region
 
VertexBuffer< VertexFormatm_Buffer
 
- Protected Attributes inherited from Gwk::Renderer::Base
float m_fScale
 

Detailed Description

Renderer for DirectX11.


Class Documentation

◆ Gwk::Renderer::DirectX11::VertexFormat

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

Member Function Documentation

◆ StartClip()

void Gwk::Renderer::DirectX11::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: