DDraceNetwork Docs
CGraphics_Threaded Class Reference

#include <graphics_threaded.h>

Inheritance diagram for CGraphics_Threaded:
[legend]
Collaboration diagram for CGraphics_Threaded:
[legend]

Classes

struct  SQuadContainer
 
struct  SVertexArrayInfo
 

Public Member Functions

 CGraphics_Threaded ()
 
void ClipEnable (int x, int y, int w, int h) override
 
void ClipDisable () override
 
void BlendNone () override
 
void BlendNormal () override
 
void BlendAdditive () override
 
void WrapNormal () override
 
void WrapClamp () override
 
uint64_t TextureMemoryUsage () const override
 
uint64_t BufferMemoryUsage () const override
 
uint64_t StreamedMemoryUsage () const override
 
uint64_t StagingMemoryUsage () const override
 
const TTwGraphicsGpuListGetGpus () const override
 
void MapScreen (float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY) override
 
void GetScreen (float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY) override
 
void LinesBegin () override
 
void LinesEnd () override
 
void LinesDraw (const CLineItem *pArray, int Num) override
 
IGraphics::CTextureHandle FindFreeTextureIndex ()
 
void FreeTextureIndex (CTextureHandle *pIndex)
 
void UnloadTexture (IGraphics::CTextureHandle *pIndex) override
 
IGraphics::CTextureHandle LoadTextureRaw (const CImageInfo &Image, int Flags, const char *pTexName=nullptr) override
 
IGraphics::CTextureHandle LoadTextureRawMove (CImageInfo &Image, int Flags, const char *pTexName=nullptr) override
 
bool LoadTextTextures (size_t Width, size_t Height, CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture, uint8_t *pTextData, uint8_t *pTextOutlineData) override
 
bool UnloadTextTextures (CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture) override
 
bool UpdateTextTexture (CTextureHandle TextureId, int x, int y, size_t Width, size_t Height, uint8_t *pData, bool IsMovedPointer) override
 
CTextureHandle LoadSpriteTexture (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite) override
 
bool IsImageSubFullyTransparent (const CImageInfo &FromImageInfo, int x, int y, int w, int h) override
 
bool IsSpriteTextureFullyTransparent (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite) override
 
IGraphics::CTextureHandle LoadTexture (const char *pFilename, int StorageType, int Flags=0) override
 
bool LoadPng (CImageInfo &Image, const char *pFilename, int StorageType) override
 
bool LoadPng (CImageInfo &Image, const uint8_t *pData, size_t DataSize, const char *pContextName) override
 
bool CheckImageDivisibility (const char *pContextName, CImageInfo &Image, int DivX, int DivY, bool AllowResize) override
 
bool IsImageFormatRgba (const char *pContextName, const CImageInfo &Image) override
 
void TextureSet (CTextureHandle TextureId) override
 
void Clear (float r, float g, float b, bool ForceClearNow=false) override
 
void QuadsBegin () override
 
void QuadsEnd () override
 
void QuadsTex3DBegin () override
 
void QuadsTex3DEnd () override
 
void TrianglesBegin () override
 
void TrianglesEnd () override
 
void QuadsEndKeepVertices () override
 
void QuadsDrawCurrentVertices (bool KeepVertices=true) override
 
void QuadsSetRotation (float Angle) override
 
template<typename TName >
void SetColor (TName *pVertex, int ColorIndex)
 
void SetColorVertex (const CColorVertex *pArray, size_t Num) override
 
void SetColor (float r, float g, float b, float a) override
 
void SetColor (ColorRGBA Color) override
 
void SetColor4 (ColorRGBA TopLeft, ColorRGBA TopRight, ColorRGBA BottomLeft, ColorRGBA BottomRight) override
 
void ChangeColorOfCurrentQuadVertices (float r, float g, float b, float a) override
 
void ChangeColorOfQuadVertices (size_t QuadOffset, unsigned char r, unsigned char g, unsigned char b, unsigned char a) override
 
void QuadsSetSubset (float TlU, float TlV, float BrU, float BrV) override
 
void QuadsSetSubsetFree (float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, int Index=-1) override
 
void QuadsDraw (CQuadItem *pArray, int Num) override
 
template<typename TName >
void QuadsDrawTLImpl (TName *pVertices, const CQuadItem *pArray, int Num)
 
void QuadsDrawTL (const CQuadItem *pArray, int Num) override
 
void QuadsTex3DDrawTL (const CQuadItem *pArray, int Num) override
 
void QuadsDrawFreeform (const CFreeformItem *pArray, int Num) override
 
void QuadsText (float x, float y, float Size, const char *pText) override
 
void DrawRectExt (float x, float y, float w, float h, float r, int Corners) override
 
void DrawRectExt4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, float r, int Corners) override
 
int CreateRectQuadContainer (float x, float y, float w, float h, float r, int Corners) override
 
void DrawRect (float x, float y, float w, float h, ColorRGBA Color, int Corners, float Rounding) override
 
void DrawRect4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, int Corners, float Rounding) override
 
void DrawCircle (float CenterX, float CenterY, float Radius, int Segments) override
 
const GL_STexCoordGetCurTextureCoordinates () override
 
const GL_SColorGetCurColor () override
 
int CreateQuadContainer (bool AutomaticUpload=true) override
 
void QuadContainerChangeAutomaticUpload (int ContainerIndex, bool AutomaticUpload) override
 
void QuadContainerUpload (int ContainerIndex) override
 
int QuadContainerAddQuads (int ContainerIndex, CQuadItem *pArray, int Num) override
 
int QuadContainerAddQuads (int ContainerIndex, CFreeformItem *pArray, int Num) override
 
void QuadContainerReset (int ContainerIndex) override
 
void DeleteQuadContainer (int &ContainerIndex) override
 
void RenderQuadContainer (int ContainerIndex, int QuadDrawNum) override
 
void RenderQuadContainer (int ContainerIndex, int QuadOffset, int QuadDrawNum, bool ChangeWrapMode=true) override
 
void RenderQuadContainerEx (int ContainerIndex, int QuadOffset, int QuadDrawNum, float X, float Y, float ScaleX=1.f, float ScaleY=1.f) override
 
void RenderQuadContainerAsSprite (int ContainerIndex, int QuadOffset, float X, float Y, float ScaleX=1.f, float ScaleY=1.f) override
 
void RenderQuadContainerAsSpriteMultiple (int ContainerIndex, int QuadOffset, int DrawCount, SRenderSpriteInfo *pRenderInfo) override
 
template<typename TName >
void FlushVerticesImpl (bool KeepVertices, int &PrimType, size_t &PrimCount, size_t &NumVerts, TName &Command, size_t VertSize)
 
void FlushVertices (bool KeepVertices=false) override
 
void FlushVerticesTex3D () override
 
void RenderTileLayer (int BufferContainerIndex, const ColorRGBA &Color, char **pOffsets, unsigned int *pIndicedVertexDrawNum, size_t NumIndicesOffset) override
 
virtual void RenderBorderTiles (int BufferContainerIndex, const ColorRGBA &Color, char *pIndexBufferOffset, const vec2 &Offset, const vec2 &Scale, uint32_t DrawNum) override
 
void RenderQuadLayer (int BufferContainerIndex, SQuadRenderInfo *pQuadInfo, size_t QuadNum, int QuadOffset) override
 
void RenderText (int BufferContainerIndex, int TextQuadNum, int TextureSize, int TextureTextIndex, int TextureTextOutlineIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor) override
 
int CreateBufferObject (size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false) override
 
void RecreateBufferObject (int BufferIndex, size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false) override
 
void UpdateBufferObjectInternal (int BufferIndex, size_t UploadDataSize, void *pUploadData, void *pOffset, bool IsMovedPointer=false)
 
void CopyBufferObjectInternal (int WriteBufferIndex, int ReadBufferIndex, size_t WriteOffset, size_t ReadOffset, size_t CopyDataSize)
 
void DeleteBufferObject (int BufferIndex) override
 
int CreateBufferContainer (SBufferContainerInfo *pContainerInfo) override
 
void DeleteBufferContainer (int &ContainerIndex, bool DestroyAllBO=true) override
 
void UpdateBufferContainerInternal (int ContainerIndex, SBufferContainerInfo *pContainerInfo)
 
void IndicesNumRequiredNotify (unsigned int RequiredIndicesCount) override
 
int GetNumScreens () const override
 
const char * GetScreenName (int Screen) const override
 
void Minimize () override
 
void Maximize () override
 
void WarnPngliteIncompatibleImages (bool Warn) override
 
void SetWindowParams (int FullscreenMode, bool IsBorderless) override
 
bool SetWindowScreen (int Index) override
 
void Move (int x, int y) override
 
bool Resize (int w, int h, int RefreshRate) override
 
void ResizeToScreen () override
 
void GotResized (int w, int h, int RefreshRate) override
 
void UpdateViewport (int X, int Y, int W, int H, bool ByResize) override
 
void AddWindowResizeListener (WINDOW_RESIZE_FUNC pFunc) override
 
void AddWindowPropChangeListener (WINDOW_PROPS_CHANGED_FUNC pFunc) override
 
int GetWindowScreen () override
 
void WindowDestroyNtf (uint32_t WindowId) override
 
void WindowCreateNtf (uint32_t WindowId) override
 
int WindowActive () override
 
int WindowOpen () override
 
void SetWindowGrab (bool Grab) override
 
void NotifyWindow () override
 
int Init () override
 
void Shutdown () override
 
void ReadPixel (ivec2 Position, ColorRGBA *pColor) override
 
void TakeScreenshot (const char *pFilename) override
 
void TakeCustomScreenshot (const char *pFilename) override
 
void Swap () override
 
bool SetVSync (bool State) override
 
bool SetMultiSampling (uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend) override
 
int GetVideoModes (CVideoMode *pModes, int MaxModes, int Screen) override
 
void GetCurrentVideoMode (CVideoMode &CurMode, int Screen) override
 
virtual int GetDesktopScreenWidth () const
 
virtual int GetDesktopScreenHeight () const
 
void InsertSignal (CSemaphore *pSemaphore) override
 
bool IsIdle () const override
 
void WaitForIdle () override
 
SWarningGetCurWarning () override
 
bool ShowMessageBox (unsigned Type, const char *pTitle, const char *pMsg) override
 
bool IsBackendInitialized () override
 
bool GetDriverVersion (EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType) override
 
bool IsConfigModernAPI () override
 
bool IsTileBufferingEnabled () override
 
bool IsQuadBufferingEnabled () override
 
bool IsTextBufferingEnabled () override
 
bool IsQuadContainerBufferingEnabled () override
 
bool Uses2DTextureArrays () override
 
bool HasTextureArraysSupport () override
 
const char * GetVendorString () override
 
const char * GetVersionString () override
 
const char * GetRendererString () override
 
TGLBackendReadPresentedImageDataGetReadPresentedImageDataFuncUnsafe () override
 
virtual int Init ()=0
 
virtual void Shutdown () override=0
 
virtual void Minimize ()=0
 
virtual void Maximize ()=0
 
virtual int WindowActive ()=0
 
virtual int WindowOpen ()=0
 
- Public Member Functions inherited from IGraphics
int ScreenWidth () const
 
int ScreenHeight () const
 
float ScreenAspect () const
 
float ScreenHiDPIScale () const
 
int WindowWidth () const
 
int WindowHeight () const
 
virtual void WarnPngliteIncompatibleImages (bool Warn)=0
 
virtual void SetWindowParams (int FullscreenMode, bool IsBorderless)=0
 
virtual bool SetWindowScreen (int Index)=0
 
virtual bool SetVSync (bool State)=0
 
virtual bool SetMultiSampling (uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend)=0
 
virtual int GetWindowScreen ()=0
 
virtual void Move (int x, int y)=0
 
virtual bool Resize (int w, int h, int RefreshRate)=0
 
virtual void ResizeToScreen ()=0
 
virtual void GotResized (int w, int h, int RefreshRate)=0
 
virtual void UpdateViewport (int X, int Y, int W, int H, bool ByResize)=0
 
virtual void AddWindowResizeListener (WINDOW_RESIZE_FUNC pFunc)=0
 
virtual void AddWindowPropChangeListener (WINDOW_PROPS_CHANGED_FUNC pFunc)=0
 
virtual void WindowDestroyNtf (uint32_t WindowId)=0
 
virtual void WindowCreateNtf (uint32_t WindowId)=0
 
virtual void Clear (float r, float g, float b, bool ForceClearNow=false)=0
 
virtual void ClipEnable (int x, int y, int w, int h)=0
 
virtual void ClipDisable ()=0
 
virtual void MapScreen (float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY)=0
 
virtual void GetScreen (float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY)=0
 
virtual void BlendNone ()=0
 
virtual void BlendNormal ()=0
 
virtual void BlendAdditive ()=0
 
virtual void WrapNormal ()=0
 
virtual void WrapClamp ()=0
 
virtual uint64_t TextureMemoryUsage () const =0
 
virtual uint64_t BufferMemoryUsage () const =0
 
virtual uint64_t StreamedMemoryUsage () const =0
 
virtual uint64_t StagingMemoryUsage () const =0
 
virtual const TTwGraphicsGpuListGetGpus () const =0
 
virtual bool LoadPng (CImageInfo &Image, const char *pFilename, int StorageType)=0
 
virtual bool LoadPng (CImageInfo &Image, const uint8_t *pData, size_t DataSize, const char *pContextName)=0
 
virtual bool CheckImageDivisibility (const char *pContextName, CImageInfo &Image, int DivX, int DivY, bool AllowResize)=0
 
virtual bool IsImageFormatRgba (const char *pContextName, const CImageInfo &Image)=0
 
virtual void UnloadTexture (CTextureHandle *pIndex)=0
 
virtual CTextureHandle LoadTextureRaw (const CImageInfo &Image, int Flags, const char *pTexName=nullptr)=0
 
virtual CTextureHandle LoadTextureRawMove (CImageInfo &Image, int Flags, const char *pTexName=nullptr)=0
 
virtual CTextureHandle LoadTexture (const char *pFilename, int StorageType, int Flags=0)=0
 
virtual void TextureSet (CTextureHandle Texture)=0
 
void TextureClear ()
 
virtual bool LoadTextTextures (size_t Width, size_t Height, CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture, uint8_t *pTextData, uint8_t *pTextOutlineData)=0
 
virtual bool UnloadTextTextures (CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture)=0
 
virtual bool UpdateTextTexture (CTextureHandle TextureId, int x, int y, size_t Width, size_t Height, uint8_t *pData, bool IsMovedPointer)=0
 
virtual CTextureHandle LoadSpriteTexture (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite)=0
 
virtual bool IsImageSubFullyTransparent (const CImageInfo &FromImageInfo, int x, int y, int w, int h)=0
 
virtual bool IsSpriteTextureFullyTransparent (const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite)=0
 
virtual void FlushVertices (bool KeepVertices=false)=0
 
virtual void FlushVerticesTex3D ()=0
 
virtual void RenderTileLayer (int BufferContainerIndex, const ColorRGBA &Color, char **pOffsets, unsigned int *pIndicedVertexDrawNum, size_t NumIndicesOffset)=0
 
virtual void RenderBorderTiles (int BufferContainerIndex, const ColorRGBA &Color, char *pIndexBufferOffset, const vec2 &Offset, const vec2 &Scale, uint32_t DrawNum)=0
 
virtual void RenderQuadLayer (int BufferContainerIndex, SQuadRenderInfo *pQuadInfo, size_t QuadNum, int QuadOffset)=0
 
virtual void RenderText (int BufferContainerIndex, int TextQuadNum, int TextureSize, int TextureTextIndex, int TextureTextOutlineIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor)=0
 
virtual int CreateBufferObject (size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false)=0
 
virtual void RecreateBufferObject (int BufferIndex, size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false)=0
 
virtual void DeleteBufferObject (int BufferIndex)=0
 
virtual int CreateBufferContainer (struct SBufferContainerInfo *pContainerInfo)=0
 
virtual void DeleteBufferContainer (int &ContainerIndex, bool DestroyAllBO=true)=0
 
virtual void IndicesNumRequiredNotify (unsigned int RequiredIndicesCount)=0
 
virtual bool GetDriverVersion (EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType)=0
 
virtual bool IsConfigModernAPI ()=0
 
virtual bool IsTileBufferingEnabled ()=0
 
virtual bool IsQuadBufferingEnabled ()=0
 
virtual bool IsTextBufferingEnabled ()=0
 
virtual bool IsQuadContainerBufferingEnabled ()=0
 
virtual bool Uses2DTextureArrays ()=0
 
virtual bool HasTextureArraysSupport ()=0
 
virtual const char * GetVendorString ()=0
 
virtual const char * GetVersionString ()=0
 
virtual const char * GetRendererString ()=0
 
virtual void LinesBegin ()=0
 
virtual void LinesEnd ()=0
 
virtual void LinesDraw (const CLineItem *pArray, int Num)=0
 
virtual void QuadsBegin ()=0
 
virtual void QuadsEnd ()=0
 
virtual void QuadsTex3DBegin ()=0
 
virtual void QuadsTex3DEnd ()=0
 
virtual void TrianglesBegin ()=0
 
virtual void TrianglesEnd ()=0
 
virtual void QuadsEndKeepVertices ()=0
 
virtual void QuadsDrawCurrentVertices (bool KeepVertices=true)=0
 
virtual void QuadsSetRotation (float Angle)=0
 
virtual void QuadsSetSubset (float TopLeftU, float TopLeftV, float BottomRightU, float BottomRightV)=0
 
virtual void QuadsSetSubsetFree (float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, int Index=-1)=0
 
virtual void QuadsDraw (CQuadItem *pArray, int Num)=0
 
virtual void QuadsDrawTL (const CQuadItem *pArray, int Num)=0
 
virtual void QuadsTex3DDrawTL (const CQuadItem *pArray, int Num)=0
 
virtual const GL_STexCoordGetCurTextureCoordinates ()=0
 
virtual const GL_SColorGetCurColor ()=0
 
virtual int CreateQuadContainer (bool AutomaticUpload=true)=0
 
virtual void QuadContainerChangeAutomaticUpload (int ContainerIndex, bool AutomaticUpload)=0
 
virtual void QuadContainerUpload (int ContainerIndex)=0
 
virtual int QuadContainerAddQuads (int ContainerIndex, CQuadItem *pArray, int Num)=0
 
virtual int QuadContainerAddQuads (int ContainerIndex, CFreeformItem *pArray, int Num)=0
 
virtual void QuadContainerReset (int ContainerIndex)=0
 
virtual void DeleteQuadContainer (int &ContainerIndex)=0
 
virtual void RenderQuadContainer (int ContainerIndex, int QuadDrawNum)=0
 
virtual void RenderQuadContainer (int ContainerIndex, int QuadOffset, int QuadDrawNum, bool ChangeWrapMode=true)=0
 
virtual void RenderQuadContainerEx (int ContainerIndex, int QuadOffset, int QuadDrawNum, float X, float Y, float ScaleX=1.f, float ScaleY=1.f)=0
 
virtual void RenderQuadContainerAsSprite (int ContainerIndex, int QuadOffset, float X, float Y, float ScaleX=1.f, float ScaleY=1.f)=0
 
virtual void RenderQuadContainerAsSpriteMultiple (int ContainerIndex, int QuadOffset, int DrawCount, SRenderSpriteInfo *pRenderInfo)=0
 
virtual void QuadsDrawFreeform (const CFreeformItem *pArray, int Num)=0
 
virtual void QuadsText (float x, float y, float Size, const char *pText)=0
 
virtual void DrawRectExt (float x, float y, float w, float h, float r, int Corners)=0
 
virtual void DrawRectExt4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, float r, int Corners)=0
 
virtual int CreateRectQuadContainer (float x, float y, float w, float h, float r, int Corners)=0
 
virtual void DrawRect (float x, float y, float w, float h, ColorRGBA Color, int Corners, float Rounding)=0
 
virtual void DrawRect4 (float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, int Corners, float Rounding)=0
 
virtual void DrawCircle (float CenterX, float CenterY, float Radius, int Segments)=0
 
virtual void SetColorVertex (const CColorVertex *pArray, size_t Num)=0
 
virtual void SetColor (float r, float g, float b, float a)=0
 
virtual void SetColor (ColorRGBA Color)=0
 
virtual void SetColor4 (ColorRGBA TopLeft, ColorRGBA TopRight, ColorRGBA BottomLeft, ColorRGBA BottomRight)=0
 
virtual void ChangeColorOfCurrentQuadVertices (float r, float g, float b, float a)=0
 
virtual void ChangeColorOfQuadVertices (size_t QuadOffset, unsigned char r, unsigned char g, unsigned char b, unsigned char a)=0
 
virtual void ReadPixel (ivec2 Position, ColorRGBA *pColor)=0
 
virtual void TakeScreenshot (const char *pFilename)=0
 
virtual void TakeCustomScreenshot (const char *pFilename)=0
 
virtual int GetVideoModes (CVideoMode *pModes, int MaxModes, int Screen)=0
 
virtual void GetCurrentVideoMode (CVideoMode &CurMode, int Screen)=0
 
virtual void Swap ()=0
 
virtual int GetNumScreens () const =0
 
virtual const char * GetScreenName (int Screen) const =0
 
virtual void InsertSignal (class CSemaphore *pSemaphore)=0
 
virtual bool IsIdle () const =0
 
virtual void WaitForIdle ()=0
 
virtual void SetWindowGrab (bool Grab)=0
 
virtual void NotifyWindow ()=0
 
virtual TGLBackendReadPresentedImageDataGetReadPresentedImageDataFuncUnsafe ()=0
 
virtual SWarningGetCurWarning ()=0
 
virtual bool ShowMessageBox (unsigned Type, const char *pTitle, const char *pMsg)=0
 
virtual bool IsBackendInitialized ()=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Private Types

enum  { NUM_CMDBUFFERS = 2 , DRAWING_QUADS = 1 , DRAWING_LINES = 2 , DRAWING_TRIANGLES = 3 }
 

Private Member Functions

void * AllocCommandBufferData (size_t AllocSize)
 
void AddVertices (int Count)
 
void AddVertices (int Count, CCommandBuffer::SVertex *pVertices)
 
void AddVertices (int Count, CCommandBuffer::SVertexTex3DStream *pVertices)
 
template<typename TName >
void Rotate (const CCommandBuffer::SPoint &rCenter, TName *pPoints, int NumPoints)
 
template<typename TName >
void AddCmd (TName &Cmd, std::function< bool()> FailFunc=[] { return true;})
 
void KickCommandBuffer ()
 
void AddBackEndWarningIfExists ()
 
void AdjustViewport (bool SendViewportChangeToBackend)
 
void ReadPixelDirect (bool *pSwapped)
 
void ScreenshotDirect (bool *pSwapped)
 
int IssueInit ()
 
int InitWindow ()
 

Private Attributes

CCommandBuffer::SState m_State
 
IGraphicsBackendm_pBackend
 
bool m_GLTileBufferingEnabled
 
bool m_GLQuadBufferingEnabled
 
bool m_GLTextBufferingEnabled
 
bool m_GLQuadContainerBufferingEnabled
 
bool m_GLUses2DTextureArrays
 
bool m_GLHasTextureArraysSupport
 
bool m_GLUseTrianglesAsQuad
 
CCommandBufferm_apCommandBuffers [NUM_CMDBUFFERS]
 
CCommandBufferm_pCommandBuffer
 
unsigned m_CurrentCommandBuffer
 
class IStoragem_pStorage
 
class IConsolem_pConsole
 
class IEnginem_pEngine
 
int m_CurIndex
 
CCommandBuffer::SVertex m_aVertices [CCommandBuffer::MAX_VERTICES]
 
CCommandBuffer::SVertexTex3DStream m_aVerticesTex3D [CCommandBuffer::MAX_VERTICES]
 
int m_NumVertices
 
CCommandBuffer::SColor m_aColor [4]
 
CCommandBuffer::STexCoord m_aTexture [4]
 
bool m_RenderEnable
 
float m_Rotation
 
int m_Drawing
 
bool m_DoScreenshot
 
char m_aScreenshotName [IO_MAX_PATH_LENGTH]
 
CTextureHandle m_NullTexture
 
std::vector< int > m_vTextureIndices
 
size_t m_FirstFreeTexture
 
int m_TextureMemoryUsage
 
bool m_WarnPngliteIncompatibleImages = false
 
std::vector< SWarningm_vWarnings
 
bool m_IsForcedViewport = false
 
std::vector< SVertexArrayInfom_vVertexArrayInfo
 
int m_FirstFreeVertexArrayInfo
 
std::vector< int > m_vBufferObjectIndices
 
int m_FirstFreeBufferObjectIndex
 
std::vector< SQuadContainerm_vQuadContainers
 
int m_FirstFreeQuadContainer
 
std::vector< WINDOW_RESIZE_FUNCm_vResizeListeners
 
std::vector< WINDOW_PROPS_CHANGED_FUNCm_vPropChangeListeners
 
ivec2 m_ReadPixelPosition = ivec2(0, 0)
 
ColorRGBAm_pReadPixelColor = nullptr
 

Additional Inherited Members

- Public Types inherited from IGraphics
enum  { TEXLOAD_TO_3D_TEXTURE = 1 << 0 , TEXLOAD_TO_2D_ARRAY_TEXTURE = 1 << 1 , TEXLOAD_NO_2D_TEXTURE = 1 << 2 }
 
enum  EBufferObjectCreateFlags { BUFFER_OBJECT_CREATE_FLAGS_ONE_TIME_USE_BIT = 1 << 0 }
 
enum  {
  CORNER_NONE = 0 , CORNER_TL = 1 , CORNER_TR = 2 , CORNER_BL = 4 ,
  CORNER_BR = 8 , CORNER_T = CORNER_TL | CORNER_TR , CORNER_B = CORNER_BL | CORNER_BR , CORNER_R = CORNER_TR | CORNER_BR ,
  CORNER_L = CORNER_TL | CORNER_BL , CORNER_ALL = CORNER_T | CORNER_B
}
 
- Static Public Member Functions inherited from IEngineGraphics
static const char * InterfaceName ()
 
- Static Public Member Functions inherited from IGraphics
static const char * InterfaceName ()
 
- Protected Member Functions inherited from IGraphics
CTextureHandle CreateTextureHandle (int Index)
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 
- Protected Attributes inherited from IGraphics
int m_ScreenWidth
 
int m_ScreenHeight
 
int m_ScreenRefreshRate
 
float m_ScreenHiDPIScale
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NUM_CMDBUFFERS 
DRAWING_QUADS 
DRAWING_LINES 
DRAWING_TRIANGLES 

Constructor & Destructor Documentation

◆ CGraphics_Threaded()

CGraphics_Threaded::CGraphics_Threaded ( )

Member Function Documentation

◆ AddBackEndWarningIfExists()

void CGraphics_Threaded::AddBackEndWarningIfExists ( )
private

◆ AddCmd()

template<typename TName >
void CGraphics_Threaded::AddCmd ( TName &  Cmd,
std::function< bool()>  FailFunc = [] { return true; } 
)
inlineprivate

◆ AddVertices() [1/3]

void CGraphics_Threaded::AddVertices ( int  Count)
private

◆ AddVertices() [2/3]

void CGraphics_Threaded::AddVertices ( int  Count,
CCommandBuffer::SVertex pVertices 
)
private

◆ AddVertices() [3/3]

void CGraphics_Threaded::AddVertices ( int  Count,
CCommandBuffer::SVertexTex3DStream pVertices 
)
private

◆ AddWindowPropChangeListener()

void CGraphics_Threaded::AddWindowPropChangeListener ( WINDOW_PROPS_CHANGED_FUNC  pFunc)
overridevirtual

Listens to various window property changes, such as minimize, maximize, move, fullscreen mode

Implements IGraphics.

◆ AddWindowResizeListener()

void CGraphics_Threaded::AddWindowResizeListener ( WINDOW_RESIZE_FUNC  pFunc)
overridevirtual

Listens to a resize event of the canvas, which is usually caused by a window resize. Will only be triggered if the actual size changed.

Implements IGraphics.

◆ AdjustViewport()

void CGraphics_Threaded::AdjustViewport ( bool  SendViewportChangeToBackend)
private

◆ AllocCommandBufferData()

void * CGraphics_Threaded::AllocCommandBufferData ( size_t  AllocSize)
private

◆ BlendAdditive()

void CGraphics_Threaded::BlendAdditive ( )
overridevirtual

Implements IGraphics.

◆ BlendNone()

void CGraphics_Threaded::BlendNone ( )
overridevirtual

Implements IGraphics.

◆ BlendNormal()

void CGraphics_Threaded::BlendNormal ( )
overridevirtual

Implements IGraphics.

◆ BufferMemoryUsage()

uint64_t CGraphics_Threaded::BufferMemoryUsage ( ) const
overridevirtual

Implements IGraphics.

◆ ChangeColorOfCurrentQuadVertices()

void CGraphics_Threaded::ChangeColorOfCurrentQuadVertices ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Implements IGraphics.

◆ ChangeColorOfQuadVertices()

void CGraphics_Threaded::ChangeColorOfQuadVertices ( size_t  QuadOffset,
unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
overridevirtual

Implements IGraphics.

◆ CheckImageDivisibility()

bool CGraphics_Threaded::CheckImageDivisibility ( const char *  pContextName,
CImageInfo Image,
int  DivX,
int  DivY,
bool  AllowResize 
)
overridevirtual

Implements IGraphics.

◆ Clear()

void CGraphics_Threaded::Clear ( float  r,
float  g,
float  b,
bool  ForceClearNow = false 
)
overridevirtual

Implements IGraphics.

◆ ClipDisable()

void CGraphics_Threaded::ClipDisable ( )
overridevirtual

Implements IGraphics.

◆ ClipEnable()

void CGraphics_Threaded::ClipEnable ( int  x,
int  y,
int  w,
int  h 
)
overridevirtual

Implements IGraphics.

◆ CopyBufferObjectInternal()

void CGraphics_Threaded::CopyBufferObjectInternal ( int  WriteBufferIndex,
int  ReadBufferIndex,
size_t  WriteOffset,
size_t  ReadOffset,
size_t  CopyDataSize 
)

◆ CreateBufferContainer()

int CGraphics_Threaded::CreateBufferContainer ( SBufferContainerInfo pContainerInfo)
overridevirtual

Implements IGraphics.

◆ CreateBufferObject()

int CGraphics_Threaded::CreateBufferObject ( size_t  UploadDataSize,
void *  pUploadData,
int  CreateFlags,
bool  IsMovedPointer = false 
)
overridevirtual

Implements IGraphics.

◆ CreateQuadContainer()

int CGraphics_Threaded::CreateQuadContainer ( bool  AutomaticUpload = true)
overridevirtual

Implements IGraphics.

◆ CreateRectQuadContainer()

int CGraphics_Threaded::CreateRectQuadContainer ( float  x,
float  y,
float  w,
float  h,
float  r,
int  Corners 
)
overridevirtual

Implements IGraphics.

◆ DeleteBufferContainer()

void CGraphics_Threaded::DeleteBufferContainer ( int &  ContainerIndex,
bool  DestroyAllBO = true 
)
overridevirtual

Implements IGraphics.

◆ DeleteBufferObject()

void CGraphics_Threaded::DeleteBufferObject ( int  BufferIndex)
overridevirtual

Implements IGraphics.

◆ DeleteQuadContainer()

void CGraphics_Threaded::DeleteQuadContainer ( int &  ContainerIndex)
overridevirtual

Implements IGraphics.

◆ DrawCircle()

void CGraphics_Threaded::DrawCircle ( float  CenterX,
float  CenterY,
float  Radius,
int  Segments 
)
overridevirtual

Implements IGraphics.

◆ DrawRect()

void CGraphics_Threaded::DrawRect ( float  x,
float  y,
float  w,
float  h,
ColorRGBA  Color,
int  Corners,
float  Rounding 
)
overridevirtual

Implements IGraphics.

◆ DrawRect4()

void CGraphics_Threaded::DrawRect4 ( float  x,
float  y,
float  w,
float  h,
ColorRGBA  ColorTopLeft,
ColorRGBA  ColorTopRight,
ColorRGBA  ColorBottomLeft,
ColorRGBA  ColorBottomRight,
int  Corners,
float  Rounding 
)
overridevirtual

Implements IGraphics.

◆ DrawRectExt()

void CGraphics_Threaded::DrawRectExt ( float  x,
float  y,
float  w,
float  h,
float  r,
int  Corners 
)
overridevirtual

Implements IGraphics.

◆ DrawRectExt4()

void CGraphics_Threaded::DrawRectExt4 ( float  x,
float  y,
float  w,
float  h,
ColorRGBA  ColorTopLeft,
ColorRGBA  ColorTopRight,
ColorRGBA  ColorBottomLeft,
ColorRGBA  ColorBottomRight,
float  r,
int  Corners 
)
overridevirtual

Implements IGraphics.

◆ FindFreeTextureIndex()

IGraphics::CTextureHandle CGraphics_Threaded::FindFreeTextureIndex ( )

◆ FlushVertices()

void CGraphics_Threaded::FlushVertices ( bool  KeepVertices = false)
overridevirtual

Implements IGraphics.

◆ FlushVerticesImpl()

template<typename TName >
void CGraphics_Threaded::FlushVerticesImpl ( bool  KeepVertices,
int &  PrimType,
size_t &  PrimCount,
size_t &  NumVerts,
TName &  Command,
size_t  VertSize 
)
inline

◆ FlushVerticesTex3D()

void CGraphics_Threaded::FlushVerticesTex3D ( )
overridevirtual

Implements IGraphics.

◆ FreeTextureIndex()

void CGraphics_Threaded::FreeTextureIndex ( CTextureHandle pIndex)

◆ GetCurColor()

const GL_SColor * CGraphics_Threaded::GetCurColor ( )
inlineoverridevirtual

Implements IGraphics.

◆ GetCurrentVideoMode()

void CGraphics_Threaded::GetCurrentVideoMode ( CVideoMode CurMode,
int  Screen 
)
overridevirtual

Implements IGraphics.

◆ GetCurTextureCoordinates()

const GL_STexCoord * CGraphics_Threaded::GetCurTextureCoordinates ( )
inlineoverridevirtual

Implements IGraphics.

◆ GetCurWarning()

SWarning * CGraphics_Threaded::GetCurWarning ( )
overridevirtual

Implements IGraphics.

◆ GetDesktopScreenHeight()

virtual int CGraphics_Threaded::GetDesktopScreenHeight ( ) const
inlinevirtual

◆ GetDesktopScreenWidth()

virtual int CGraphics_Threaded::GetDesktopScreenWidth ( ) const
inlinevirtual

◆ GetDriverVersion()

bool CGraphics_Threaded::GetDriverVersion ( EGraphicsDriverAgeType  DriverAgeType,
int &  Major,
int &  Minor,
int &  Patch,
const char *&  pName,
EBackendType  BackendType 
)
inlineoverridevirtual

Implements IGraphics.

◆ GetGpus()

const TTwGraphicsGpuList & CGraphics_Threaded::GetGpus ( ) const
overridevirtual

Implements IGraphics.

◆ GetNumScreens()

int CGraphics_Threaded::GetNumScreens ( ) const
overridevirtual

Implements IGraphics.

◆ GetReadPresentedImageDataFuncUnsafe()

TGLBackendReadPresentedImageData & CGraphics_Threaded::GetReadPresentedImageDataFuncUnsafe ( )
overridevirtual

Implements IGraphics.

◆ GetRendererString()

const char * CGraphics_Threaded::GetRendererString ( )
overridevirtual

Implements IGraphics.

◆ GetScreen()

void CGraphics_Threaded::GetScreen ( float *  pTopLeftX,
float *  pTopLeftY,
float *  pBottomRightX,
float *  pBottomRightY 
)
overridevirtual

Implements IGraphics.

◆ GetScreenName()

const char * CGraphics_Threaded::GetScreenName ( int  Screen) const
overridevirtual

Implements IGraphics.

◆ GetVendorString()

const char * CGraphics_Threaded::GetVendorString ( )
overridevirtual

Implements IGraphics.

◆ GetVersionString()

const char * CGraphics_Threaded::GetVersionString ( )
overridevirtual

Implements IGraphics.

◆ GetVideoModes()

int CGraphics_Threaded::GetVideoModes ( CVideoMode pModes,
int  MaxModes,
int  Screen 
)
overridevirtual

Implements IGraphics.

◆ GetWindowScreen()

int CGraphics_Threaded::GetWindowScreen ( )
overridevirtual

Implements IGraphics.

◆ GotResized()

void CGraphics_Threaded::GotResized ( int  w,
int  h,
int  RefreshRate 
)
overridevirtual

Implements IGraphics.

◆ HasTextureArraysSupport()

bool CGraphics_Threaded::HasTextureArraysSupport ( )
inlineoverridevirtual

Implements IGraphics.

◆ IndicesNumRequiredNotify()

void CGraphics_Threaded::IndicesNumRequiredNotify ( unsigned int  RequiredIndicesCount)
overridevirtual

Implements IGraphics.

◆ Init()

int CGraphics_Threaded::Init ( )
overridevirtual

Implements IEngineGraphics.

◆ InitWindow()

int CGraphics_Threaded::InitWindow ( )
private

◆ InsertSignal()

void CGraphics_Threaded::InsertSignal ( CSemaphore pSemaphore)
overridevirtual

Implements IGraphics.

◆ IsBackendInitialized()

bool CGraphics_Threaded::IsBackendInitialized ( )
overridevirtual

Implements IGraphics.

◆ IsConfigModernAPI()

bool CGraphics_Threaded::IsConfigModernAPI ( )
inlineoverridevirtual

Implements IGraphics.

◆ IsIdle()

bool CGraphics_Threaded::IsIdle ( ) const
overridevirtual

Implements IGraphics.

◆ IsImageFormatRgba()

bool CGraphics_Threaded::IsImageFormatRgba ( const char *  pContextName,
const CImageInfo Image 
)
overridevirtual

Implements IGraphics.

◆ IsImageSubFullyTransparent()

bool CGraphics_Threaded::IsImageSubFullyTransparent ( const CImageInfo FromImageInfo,
int  x,
int  y,
int  w,
int  h 
)
overridevirtual

Implements IGraphics.

◆ IsQuadBufferingEnabled()

bool CGraphics_Threaded::IsQuadBufferingEnabled ( )
inlineoverridevirtual

Implements IGraphics.

◆ IsQuadContainerBufferingEnabled()

bool CGraphics_Threaded::IsQuadContainerBufferingEnabled ( )
inlineoverridevirtual

Implements IGraphics.

◆ IsSpriteTextureFullyTransparent()

bool CGraphics_Threaded::IsSpriteTextureFullyTransparent ( const CImageInfo FromImageInfo,
const struct CDataSprite pSprite 
)
overridevirtual

Implements IGraphics.

◆ IssueInit()

int CGraphics_Threaded::IssueInit ( )
private

◆ IsTextBufferingEnabled()

bool CGraphics_Threaded::IsTextBufferingEnabled ( )
inlineoverridevirtual

Implements IGraphics.

◆ IsTileBufferingEnabled()

bool CGraphics_Threaded::IsTileBufferingEnabled ( )
inlineoverridevirtual

Implements IGraphics.

◆ KickCommandBuffer()

void CGraphics_Threaded::KickCommandBuffer ( )
private

◆ LinesBegin()

void CGraphics_Threaded::LinesBegin ( )
overridevirtual

Implements IGraphics.

◆ LinesDraw()

void CGraphics_Threaded::LinesDraw ( const CLineItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ LinesEnd()

void CGraphics_Threaded::LinesEnd ( )
overridevirtual

Implements IGraphics.

◆ LoadPng() [1/2]

bool CGraphics_Threaded::LoadPng ( CImageInfo Image,
const char *  pFilename,
int  StorageType 
)
overridevirtual

Implements IGraphics.

◆ LoadPng() [2/2]

bool CGraphics_Threaded::LoadPng ( CImageInfo Image,
const uint8_t *  pData,
size_t  DataSize,
const char *  pContextName 
)
overridevirtual

Implements IGraphics.

◆ LoadSpriteTexture()

IGraphics::CTextureHandle CGraphics_Threaded::LoadSpriteTexture ( const CImageInfo FromImageInfo,
const struct CDataSprite pSprite 
)
overridevirtual

Implements IGraphics.

◆ LoadTextTextures()

bool CGraphics_Threaded::LoadTextTextures ( size_t  Width,
size_t  Height,
CTextureHandle TextTexture,
CTextureHandle TextOutlineTexture,
uint8_t *  pTextData,
uint8_t *  pTextOutlineData 
)
overridevirtual

Implements IGraphics.

◆ LoadTexture()

IGraphics::CTextureHandle CGraphics_Threaded::LoadTexture ( const char *  pFilename,
int  StorageType,
int  Flags = 0 
)
overridevirtual

Implements IGraphics.

◆ LoadTextureRaw()

IGraphics::CTextureHandle CGraphics_Threaded::LoadTextureRaw ( const CImageInfo Image,
int  Flags,
const char *  pTexName = nullptr 
)
overridevirtual

Implements IGraphics.

◆ LoadTextureRawMove()

IGraphics::CTextureHandle CGraphics_Threaded::LoadTextureRawMove ( CImageInfo Image,
int  Flags,
const char *  pTexName = nullptr 
)
overridevirtual

Implements IGraphics.

◆ MapScreen()

void CGraphics_Threaded::MapScreen ( float  TopLeftX,
float  TopLeftY,
float  BottomRightX,
float  BottomRightY 
)
overridevirtual

Implements IGraphics.

◆ Maximize()

void CGraphics_Threaded::Maximize ( )
overridevirtual

Implements IEngineGraphics.

◆ Minimize()

void CGraphics_Threaded::Minimize ( )
overridevirtual

Implements IEngineGraphics.

◆ Move()

void CGraphics_Threaded::Move ( int  x,
int  y 
)
overridevirtual

Implements IGraphics.

◆ NotifyWindow()

void CGraphics_Threaded::NotifyWindow ( )
overridevirtual

Implements IGraphics.

◆ QuadContainerAddQuads() [1/2]

int CGraphics_Threaded::QuadContainerAddQuads ( int  ContainerIndex,
CFreeformItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadContainerAddQuads() [2/2]

int CGraphics_Threaded::QuadContainerAddQuads ( int  ContainerIndex,
CQuadItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadContainerChangeAutomaticUpload()

void CGraphics_Threaded::QuadContainerChangeAutomaticUpload ( int  ContainerIndex,
bool  AutomaticUpload 
)
overridevirtual

Implements IGraphics.

◆ QuadContainerReset()

void CGraphics_Threaded::QuadContainerReset ( int  ContainerIndex)
overridevirtual

Implements IGraphics.

◆ QuadContainerUpload()

void CGraphics_Threaded::QuadContainerUpload ( int  ContainerIndex)
overridevirtual

Implements IGraphics.

◆ QuadsBegin()

void CGraphics_Threaded::QuadsBegin ( )
overridevirtual

Implements IGraphics.

◆ QuadsDraw()

void CGraphics_Threaded::QuadsDraw ( CQuadItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadsDrawCurrentVertices()

void CGraphics_Threaded::QuadsDrawCurrentVertices ( bool  KeepVertices = true)
overridevirtual

Implements IGraphics.

◆ QuadsDrawFreeform()

void CGraphics_Threaded::QuadsDrawFreeform ( const CFreeformItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadsDrawTL()

void CGraphics_Threaded::QuadsDrawTL ( const CQuadItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadsDrawTLImpl()

template<typename TName >
void CGraphics_Threaded::QuadsDrawTLImpl ( TName *  pVertices,
const CQuadItem pArray,
int  Num 
)
inline

◆ QuadsEnd()

void CGraphics_Threaded::QuadsEnd ( )
overridevirtual

Implements IGraphics.

◆ QuadsEndKeepVertices()

void CGraphics_Threaded::QuadsEndKeepVertices ( )
overridevirtual

Implements IGraphics.

◆ QuadsSetRotation()

void CGraphics_Threaded::QuadsSetRotation ( float  Angle)
overridevirtual

Implements IGraphics.

◆ QuadsSetSubset()

void CGraphics_Threaded::QuadsSetSubset ( float  TlU,
float  TlV,
float  BrU,
float  BrV 
)
overridevirtual

Implements IGraphics.

◆ QuadsSetSubsetFree()

void CGraphics_Threaded::QuadsSetSubsetFree ( float  x0,
float  y0,
float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3,
int  Index = -1 
)
overridevirtual

Implements IGraphics.

◆ QuadsTex3DBegin()

void CGraphics_Threaded::QuadsTex3DBegin ( )
overridevirtual

Implements IGraphics.

◆ QuadsTex3DDrawTL()

void CGraphics_Threaded::QuadsTex3DDrawTL ( const CQuadItem pArray,
int  Num 
)
overridevirtual

Implements IGraphics.

◆ QuadsTex3DEnd()

void CGraphics_Threaded::QuadsTex3DEnd ( )
overridevirtual

Implements IGraphics.

◆ QuadsText()

void CGraphics_Threaded::QuadsText ( float  x,
float  y,
float  Size,
const char *  pText 
)
overridevirtual

Implements IGraphics.

◆ ReadPixel()

void CGraphics_Threaded::ReadPixel ( ivec2  Position,
ColorRGBA pColor 
)
overridevirtual

Reads the color at the specified position from the backbuffer once, after the next swap operation.

Parameters
PositionThe pixel position to read.
pColorPointer that will receive the read pixel color. The pointer must be valid until the next swap operation.

Implements IGraphics.

◆ ReadPixelDirect()

void CGraphics_Threaded::ReadPixelDirect ( bool *  pSwapped)
private

◆ RecreateBufferObject()

void CGraphics_Threaded::RecreateBufferObject ( int  BufferIndex,
size_t  UploadDataSize,
void *  pUploadData,
int  CreateFlags,
bool  IsMovedPointer = false 
)
overridevirtual

Implements IGraphics.

◆ RenderBorderTiles()

void CGraphics_Threaded::RenderBorderTiles ( int  BufferContainerIndex,
const ColorRGBA Color,
char *  pIndexBufferOffset,
const vec2 Offset,
const vec2 Scale,
uint32_t  DrawNum 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadContainer() [1/2]

void CGraphics_Threaded::RenderQuadContainer ( int  ContainerIndex,
int  QuadDrawNum 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadContainer() [2/2]

void CGraphics_Threaded::RenderQuadContainer ( int  ContainerIndex,
int  QuadOffset,
int  QuadDrawNum,
bool  ChangeWrapMode = true 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadContainerAsSprite()

void CGraphics_Threaded::RenderQuadContainerAsSprite ( int  ContainerIndex,
int  QuadOffset,
float  X,
float  Y,
float  ScaleX = 1.f,
float  ScaleY = 1.f 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadContainerAsSpriteMultiple()

void CGraphics_Threaded::RenderQuadContainerAsSpriteMultiple ( int  ContainerIndex,
int  QuadOffset,
int  DrawCount,
SRenderSpriteInfo pRenderInfo 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadContainerEx()

void CGraphics_Threaded::RenderQuadContainerEx ( int  ContainerIndex,
int  QuadOffset,
int  QuadDrawNum,
float  X,
float  Y,
float  ScaleX = 1.f,
float  ScaleY = 1.f 
)
overridevirtual

Implements IGraphics.

◆ RenderQuadLayer()

void CGraphics_Threaded::RenderQuadLayer ( int  BufferContainerIndex,
SQuadRenderInfo pQuadInfo,
size_t  QuadNum,
int  QuadOffset 
)
overridevirtual

Implements IGraphics.

◆ RenderText()

void CGraphics_Threaded::RenderText ( int  BufferContainerIndex,
int  TextQuadNum,
int  TextureSize,
int  TextureTextIndex,
int  TextureTextOutlineIndex,
const ColorRGBA TextColor,
const ColorRGBA TextOutlineColor 
)
overridevirtual

Implements IGraphics.

◆ RenderTileLayer()

void CGraphics_Threaded::RenderTileLayer ( int  BufferContainerIndex,
const ColorRGBA Color,
char **  pOffsets,
unsigned int *  pIndicedVertexDrawNum,
size_t  NumIndicesOffset 
)
overridevirtual

Implements IGraphics.

◆ Resize()

bool CGraphics_Threaded::Resize ( int  w,
int  h,
int  RefreshRate 
)
overridevirtual

Implements IGraphics.

◆ ResizeToScreen()

void CGraphics_Threaded::ResizeToScreen ( )
overridevirtual

Implements IGraphics.

◆ Rotate()

template<typename TName >
void CGraphics_Threaded::Rotate ( const CCommandBuffer::SPoint rCenter,
TName *  pPoints,
int  NumPoints 
)
inlineprivate

◆ ScreenshotDirect()

void CGraphics_Threaded::ScreenshotDirect ( bool *  pSwapped)
private

◆ SetColor() [1/3]

void CGraphics_Threaded::SetColor ( ColorRGBA  Color)
overridevirtual

Implements IGraphics.

◆ SetColor() [2/3]

void CGraphics_Threaded::SetColor ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Implements IGraphics.

◆ SetColor() [3/3]

template<typename TName >
void CGraphics_Threaded::SetColor ( TName *  pVertex,
int  ColorIndex 
)
inline

◆ SetColor4()

void CGraphics_Threaded::SetColor4 ( ColorRGBA  TopLeft,
ColorRGBA  TopRight,
ColorRGBA  BottomLeft,
ColorRGBA  BottomRight 
)
overridevirtual

Implements IGraphics.

◆ SetColorVertex()

void CGraphics_Threaded::SetColorVertex ( const CColorVertex pArray,
size_t  Num 
)
overridevirtual

Implements IGraphics.

◆ SetMultiSampling()

bool CGraphics_Threaded::SetMultiSampling ( uint32_t  ReqMultiSamplingCount,
uint32_t &  MultiSamplingCountBackend 
)
overridevirtual

Implements IGraphics.

◆ SetVSync()

bool CGraphics_Threaded::SetVSync ( bool  State)
overridevirtual

Implements IGraphics.

◆ SetWindowGrab()

void CGraphics_Threaded::SetWindowGrab ( bool  Grab)
overridevirtual

Implements IGraphics.

◆ SetWindowParams()

void CGraphics_Threaded::SetWindowParams ( int  FullscreenMode,
bool  IsBorderless 
)
overridevirtual

Implements IGraphics.

◆ SetWindowScreen()

bool CGraphics_Threaded::SetWindowScreen ( int  Index)
overridevirtual

Implements IGraphics.

◆ ShowMessageBox()

bool CGraphics_Threaded::ShowMessageBox ( unsigned  Type,
const char *  pTitle,
const char *  pMsg 
)
overridevirtual

Implements IGraphics.

◆ Shutdown()

void CGraphics_Threaded::Shutdown ( )
overridevirtual

Implements IEngineGraphics.

◆ StagingMemoryUsage()

uint64_t CGraphics_Threaded::StagingMemoryUsage ( ) const
overridevirtual

Implements IGraphics.

◆ StreamedMemoryUsage()

uint64_t CGraphics_Threaded::StreamedMemoryUsage ( ) const
overridevirtual

Implements IGraphics.

◆ Swap()

void CGraphics_Threaded::Swap ( )
overridevirtual

Implements IGraphics.

◆ TakeCustomScreenshot()

void CGraphics_Threaded::TakeCustomScreenshot ( const char *  pFilename)
overridevirtual

Implements IGraphics.

◆ TakeScreenshot()

void CGraphics_Threaded::TakeScreenshot ( const char *  pFilename)
overridevirtual

Implements IGraphics.

◆ TextureMemoryUsage()

uint64_t CGraphics_Threaded::TextureMemoryUsage ( ) const
overridevirtual

Implements IGraphics.

◆ TextureSet()

void CGraphics_Threaded::TextureSet ( CTextureHandle  TextureId)
overridevirtual

Implements IGraphics.

◆ TrianglesBegin()

void CGraphics_Threaded::TrianglesBegin ( )
overridevirtual

Implements IGraphics.

◆ TrianglesEnd()

void CGraphics_Threaded::TrianglesEnd ( )
overridevirtual

Implements IGraphics.

◆ UnloadTextTextures()

bool CGraphics_Threaded::UnloadTextTextures ( CTextureHandle TextTexture,
CTextureHandle TextOutlineTexture 
)
overridevirtual

Implements IGraphics.

◆ UnloadTexture()

void CGraphics_Threaded::UnloadTexture ( IGraphics::CTextureHandle pIndex)
overridevirtual

Implements IGraphics.

◆ UpdateBufferContainerInternal()

void CGraphics_Threaded::UpdateBufferContainerInternal ( int  ContainerIndex,
SBufferContainerInfo pContainerInfo 
)

◆ UpdateBufferObjectInternal()

void CGraphics_Threaded::UpdateBufferObjectInternal ( int  BufferIndex,
size_t  UploadDataSize,
void *  pUploadData,
void *  pOffset,
bool  IsMovedPointer = false 
)

◆ UpdateTextTexture()

bool CGraphics_Threaded::UpdateTextTexture ( CTextureHandle  TextureId,
int  x,
int  y,
size_t  Width,
size_t  Height,
uint8_t *  pData,
bool  IsMovedPointer 
)
overridevirtual

Implements IGraphics.

◆ UpdateViewport()

void CGraphics_Threaded::UpdateViewport ( int  X,
int  Y,
int  W,
int  H,
bool  ByResize 
)
overridevirtual

Implements IGraphics.

◆ Uses2DTextureArrays()

bool CGraphics_Threaded::Uses2DTextureArrays ( )
inlineoverridevirtual

Implements IGraphics.

◆ WaitForIdle()

void CGraphics_Threaded::WaitForIdle ( )
overridevirtual

Implements IGraphics.

◆ WarnPngliteIncompatibleImages()

void CGraphics_Threaded::WarnPngliteIncompatibleImages ( bool  Warn)
overridevirtual

Implements IGraphics.

◆ WindowActive()

int CGraphics_Threaded::WindowActive ( )
overridevirtual

Implements IEngineGraphics.

◆ WindowCreateNtf()

void CGraphics_Threaded::WindowCreateNtf ( uint32_t  WindowId)
overridevirtual

Implements IGraphics.

◆ WindowDestroyNtf()

void CGraphics_Threaded::WindowDestroyNtf ( uint32_t  WindowId)
overridevirtual

Implements IGraphics.

◆ WindowOpen()

int CGraphics_Threaded::WindowOpen ( )
overridevirtual

Implements IEngineGraphics.

◆ WrapClamp()

void CGraphics_Threaded::WrapClamp ( )
overridevirtual

Implements IGraphics.

◆ WrapNormal()

void CGraphics_Threaded::WrapNormal ( )
overridevirtual

Implements IGraphics.

Member Data Documentation

◆ m_aColor

CCommandBuffer::SColor CGraphics_Threaded::m_aColor[4]
private

◆ m_apCommandBuffers

CCommandBuffer* CGraphics_Threaded::m_apCommandBuffers[NUM_CMDBUFFERS]
private

◆ m_aScreenshotName

char CGraphics_Threaded::m_aScreenshotName[IO_MAX_PATH_LENGTH]
private

◆ m_aTexture

CCommandBuffer::STexCoord CGraphics_Threaded::m_aTexture[4]
private

◆ m_aVertices

CCommandBuffer::SVertex CGraphics_Threaded::m_aVertices[CCommandBuffer::MAX_VERTICES]
private

◆ m_aVerticesTex3D

CCommandBuffer::SVertexTex3DStream CGraphics_Threaded::m_aVerticesTex3D[CCommandBuffer::MAX_VERTICES]
private

◆ m_CurIndex

int CGraphics_Threaded::m_CurIndex
private

◆ m_CurrentCommandBuffer

unsigned CGraphics_Threaded::m_CurrentCommandBuffer
private

◆ m_DoScreenshot

bool CGraphics_Threaded::m_DoScreenshot
private

◆ m_Drawing

int CGraphics_Threaded::m_Drawing
private

◆ m_FirstFreeBufferObjectIndex

int CGraphics_Threaded::m_FirstFreeBufferObjectIndex
private

◆ m_FirstFreeQuadContainer

int CGraphics_Threaded::m_FirstFreeQuadContainer
private

◆ m_FirstFreeTexture

size_t CGraphics_Threaded::m_FirstFreeTexture
private

◆ m_FirstFreeVertexArrayInfo

int CGraphics_Threaded::m_FirstFreeVertexArrayInfo
private

◆ m_GLHasTextureArraysSupport

bool CGraphics_Threaded::m_GLHasTextureArraysSupport
private

◆ m_GLQuadBufferingEnabled

bool CGraphics_Threaded::m_GLQuadBufferingEnabled
private

◆ m_GLQuadContainerBufferingEnabled

bool CGraphics_Threaded::m_GLQuadContainerBufferingEnabled
private

◆ m_GLTextBufferingEnabled

bool CGraphics_Threaded::m_GLTextBufferingEnabled
private

◆ m_GLTileBufferingEnabled

bool CGraphics_Threaded::m_GLTileBufferingEnabled
private

◆ m_GLUses2DTextureArrays

bool CGraphics_Threaded::m_GLUses2DTextureArrays
private

◆ m_GLUseTrianglesAsQuad

bool CGraphics_Threaded::m_GLUseTrianglesAsQuad
private

◆ m_IsForcedViewport

bool CGraphics_Threaded::m_IsForcedViewport = false
private

◆ m_NullTexture

CTextureHandle CGraphics_Threaded::m_NullTexture
private

◆ m_NumVertices

int CGraphics_Threaded::m_NumVertices
private

◆ m_pBackend

IGraphicsBackend* CGraphics_Threaded::m_pBackend
private

◆ m_pCommandBuffer

CCommandBuffer* CGraphics_Threaded::m_pCommandBuffer
private

◆ m_pConsole

class IConsole* CGraphics_Threaded::m_pConsole
private

◆ m_pEngine

class IEngine* CGraphics_Threaded::m_pEngine
private

◆ m_pReadPixelColor

ColorRGBA* CGraphics_Threaded::m_pReadPixelColor = nullptr
private

◆ m_pStorage

class IStorage* CGraphics_Threaded::m_pStorage
private

◆ m_ReadPixelPosition

ivec2 CGraphics_Threaded::m_ReadPixelPosition = ivec2(0, 0)
private

◆ m_RenderEnable

bool CGraphics_Threaded::m_RenderEnable
private

◆ m_Rotation

float CGraphics_Threaded::m_Rotation
private

◆ m_State

CCommandBuffer::SState CGraphics_Threaded::m_State
private

◆ m_TextureMemoryUsage

int CGraphics_Threaded::m_TextureMemoryUsage
private

◆ m_vBufferObjectIndices

std::vector<int> CGraphics_Threaded::m_vBufferObjectIndices
private

◆ m_vPropChangeListeners

std::vector<WINDOW_PROPS_CHANGED_FUNC> CGraphics_Threaded::m_vPropChangeListeners
private

◆ m_vQuadContainers

std::vector<SQuadContainer> CGraphics_Threaded::m_vQuadContainers
private

◆ m_vResizeListeners

std::vector<WINDOW_RESIZE_FUNC> CGraphics_Threaded::m_vResizeListeners
private

◆ m_vTextureIndices

std::vector<int> CGraphics_Threaded::m_vTextureIndices
private

◆ m_vVertexArrayInfo

std::vector<SVertexArrayInfo> CGraphics_Threaded::m_vVertexArrayInfo
private

◆ m_vWarnings

std::vector<SWarning> CGraphics_Threaded::m_vWarnings
private

◆ m_WarnPngliteIncompatibleImages

bool CGraphics_Threaded::m_WarnPngliteIncompatibleImages = false
private

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