1#ifndef ENGINE_CLIENT_GRAPHICS_THREADED_H
2#define ENGINE_CLIENT_GRAPHICS_THREADED_H
47 void *
Alloc(
unsigned Requested,
unsigned Alignment =
alignof(std::max_align_t))
49 size_t Offset =
reinterpret_cast<uintptr_t
>(
m_pData +
m_Used) % Alignment;
51 Offset = Alignment - Offset;
57 m_Used += Requested + Offset;
618 (void)
static_cast<const SCommand *
>(&Command);
625 pCmd->m_pNext =
nullptr;
689 virtual int Init(
const char *pName,
int *pScreen,
int *pWidth,
int *pHeight,
int *pRefreshRate,
int *pFsaaSamples,
int Flags,
int *pDesktopWidth,
int *pDesktopHeight,
int *pCurrentWidth,
int *pCurrentHeight,
class IStorage *pStorage) = 0;
699 virtual void GetVideoModes(
CVideoMode *pModes,
int MaxModes,
int *pNumModes,
int HiDPIScale,
int MaxWindowWidth,
int MaxWindowHeight,
int Screen) = 0;
746 virtual bool GetWarning(std::vector<std::string> &WarningStrings) = 0;
749 virtual bool ShowMessageBox(
unsigned Type,
const char *pTitle,
const char *pMsg) = 0;
865 template<
typename TName>
873 TName *pVertices = pPoints;
874 for(i = 0; i < NumPoints; i++)
876 x = pVertices[i].m_Pos.x - rCenter.
x;
877 y = pVertices[i].m_Pos.y - rCenter.
y;
878 pVertices[i].m_Pos.x = x * c - y *
s + rCenter.
x;
879 pVertices[i].m_Pos.y = x *
s + y * c + rCenter.
y;
883 template<
typename TName>
885 TName &Cmd, std::function<
bool()> FailFunc = [] {
return true; })
896 str_format(aError,
sizeof(aError),
"graphics: failed to run fail handler for command '%s'",
typeid(TName).name());
903 str_format(aError,
sizeof(aError),
"graphics: failed to add command '%s' to command buffer",
typeid(TName).name());
925 void ClipEnable(
int x,
int y,
int w,
int h)
override;
942 void MapScreen(
float TopLeftX,
float TopLeftY,
float BottomRightX,
float BottomRightY)
override;
943 void GetScreen(
float *pTopLeftX,
float *pTopLeftY,
float *pBottomRightX,
float *pBottomRightY)
override;
967 bool LoadPng(
CImageInfo &Image,
const char *pFilename,
int StorageType)
override;
968 bool LoadPng(
CImageInfo &Image,
const uint8_t *pData,
size_t DataSize,
const char *pContextName)
override;
975 void Clear(
float r,
float g,
float b,
bool ForceClearNow =
false)
override;
987 template<
typename TName>
990 TName *pVert = pVertex;
991 pVert->m_Color =
m_aColor[ColorIndex];
994 void SetColorVertex(
const CColorVertex *pArray,
size_t Num)
override;
995 void SetColor(
float r,
float g,
float b,
float a)
override;
1001 void ChangeColorOfQuadVertices(
size_t QuadOffset,
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a)
override;
1003 void QuadsSetSubset(
float TlU,
float TlV,
float BrU,
float BrV)
override;
1005 float x0,
float y0,
float x1,
float y1,
1006 float x2,
float y2,
float x3,
float y3,
int Index = -1)
override;
1008 void QuadsDraw(CQuadItem *pArray,
int Num)
override;
1010 template<
typename TName>
1019 for(
int i = 0; i < Num; ++i)
1066 for(
int i = 0; i < Num; ++i)
1101 void QuadsDrawTL(
const CQuadItem *pArray,
int Num)
override;
1106 void QuadsText(
float x,
float y,
float Size,
const char *pText)
override;
1108 void DrawRectExt(
float x,
float y,
float w,
float h,
float r,
int Corners)
override;
1111 void DrawRect(
float x,
float y,
float w,
float h,
ColorRGBA Color,
int Corners,
float Rounding)
override;
1113 void DrawCircle(
float CenterX,
float CenterY,
float Radius,
int Segments)
override;
1123 void RenderQuadContainer(
int ContainerIndex,
int QuadOffset,
int QuadDrawNum,
bool ChangeWrapMode =
true)
override;
1124 void RenderQuadContainerEx(
int ContainerIndex,
int QuadOffset,
int QuadDrawNum,
float X,
float Y,
float ScaleX = 1.f,
float ScaleY = 1.f)
override;
1125 void RenderQuadContainerAsSprite(
int ContainerIndex,
int QuadOffset,
float X,
float Y,
float ScaleX = 1.f,
float ScaleY = 1.f)
override;
1128 template<
typename TName>
1129 void FlushVerticesImpl(
bool KeepVertices,
int &PrimType,
size_t &PrimCount,
size_t &NumVerts, TName &Command,
size_t VertSize)
1131 Command.m_pVertices =
nullptr;
1145 PrimCount = NumVerts / 3;
1150 PrimCount = NumVerts / 4;
1156 PrimCount = NumVerts / 2;
1161 PrimCount = NumVerts / 3;
1169 Command.m_PrimType = PrimType;
1170 Command.m_PrimCount = PrimCount;
1174 return Command.m_pVertices !=
nullptr;
1183 void RenderTileLayer(
int BufferContainerIndex,
const ColorRGBA &Color,
char **pOffsets,
unsigned int *pIndicedVertexDrawNum,
size_t NumIndicesOffset)
override;
1184 virtual void RenderBorderTiles(
int BufferContainerIndex,
const ColorRGBA &Color,
char *pIndexBufferOffset,
const vec2 &Offset,
const vec2 &Scale, uint32_t DrawNum)
override;
1186 void RenderText(
int BufferContainerIndex,
int TextQuadNum,
int TextureSize,
int TextureTextIndex,
int TextureTextOutlineIndex,
const ColorRGBA &TextColor,
const ColorRGBA &TextOutlineColor)
override;
1189 int CreateBufferObject(
size_t UploadDataSize,
void *pUploadData,
int CreateFlags,
bool IsMovedPointer =
false)
override;
1190 void RecreateBufferObject(
int BufferIndex,
size_t UploadDataSize,
void *pUploadData,
int CreateFlags,
bool IsMovedPointer =
false)
override;
1191 void UpdateBufferObjectInternal(
int BufferIndex,
size_t UploadDataSize,
void *pUploadData,
void *pOffset,
bool IsMovedPointer =
false);
1192 void CopyBufferObjectInternal(
int WriteBufferIndex,
int ReadBufferIndex,
size_t WriteOffset,
size_t ReadOffset,
size_t CopyDataSize);
1209 void Move(
int x,
int y)
override;
1210 bool Resize(
int w,
int h,
int RefreshRate)
override;
1212 void GotResized(
int w,
int h,
int RefreshRate)
override;
1213 void UpdateViewport(
int X,
int Y,
int W,
int H,
bool ByResize)
override;
1227 int Init()
override;
1233 void Swap()
override;
1234 bool SetVSync(
bool State)
override;
1235 bool SetMultiSampling(uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend)
override;
1245 bool IsIdle()
const override;
1251 bool ShowMessageBox(
unsigned Type,
const char *pTitle,
const char *pMsg)
override;
1254 bool GetDriverVersion(
EGraphicsDriverAgeType DriverAgeType,
int &Major,
int &Minor,
int &Patch,
const char *&pName,
EBackendType BackendType)
override {
return m_pBackend->
GetDriverVersion(DriverAgeType, Major, Minor, Patch, pName, BackendType); }
Definition: graphics_threaded.h:21
unsigned char * m_pData
Definition: graphics_threaded.h:22
~CBuffer()
Definition: graphics_threaded.h:34
unsigned m_Used
Definition: graphics_threaded.h:24
void Reset()
Definition: graphics_threaded.h:42
unsigned DataSize() const
Definition: graphics_threaded.h:62
CBuffer(unsigned BufferSize)
Definition: graphics_threaded.h:27
void * Alloc(unsigned Requested, unsigned Alignment=alignof(std::max_align_t))
Definition: graphics_threaded.h:47
unsigned DataUsed() const
Definition: graphics_threaded.h:63
unsigned char * DataPtr()
Definition: graphics_threaded.h:61
unsigned m_Size
Definition: graphics_threaded.h:23
Definition: graphics_threaded.h:19
SCommand * Head()
Definition: graphics_threaded.h:638
GL_SVertexTex3D SVertexTex3D
Definition: graphics_threaded.h:184
bool AddCommandUnsafe(const T &Command)
Definition: graphics_threaded.h:615
void * AllocData(unsigned WantedSize)
Definition: graphics_threaded.h:609
vec2 STexCoord
Definition: graphics_threaded.h:180
SCommand * m_pCmdBufferHead
Definition: graphics_threaded.h:195
@ MAX_VERTICES
Definition: graphics_threaded.h:76
@ MAX_TEXTURES
Definition: graphics_threaded.h:75
ECommandBufferCMD
Definition: graphics_threaded.h:80
@ CMD_MULTISAMPLING
Definition: graphics_threaded.h:133
@ CMD_COPY_BUFFER_OBJECT
Definition: graphics_threaded.h:112
@ CMD_RECREATE_BUFFER_OBJECT
Definition: graphics_threaded.h:110
@ CMD_VSYNC
Definition: graphics_threaded.h:134
@ CMD_TEXT_TEXTURES_DESTROY
Definition: graphics_threaded.h:100
@ CMD_RENDER_BORDER_TILE
Definition: graphics_threaded.h:122
@ CMD_RENDER_QUAD_CONTAINER_SPRITE_MULTIPLE
Definition: graphics_threaded.h:127
@ CMD_TEXTURE_DESTROY
Definition: graphics_threaded.h:98
@ CMD_UPDATE_VIEWPORT
Definition: graphics_threaded.h:137
@ CMD_INDICES_REQUIRED_NUM_NOTIFY
Definition: graphics_threaded.h:119
@ CMD_UPDATE_BUFFER_OBJECT
Definition: graphics_threaded.h:111
@ CMD_TEXTURE_CREATE
Definition: graphics_threaded.h:97
@ CMDGROUP_PLATFORM_GL
Definition: graphics_threaded.h:83
@ CMD_RENDER_TEX3D
Definition: graphics_threaded.h:106
@ CMD_SIGNAL
Definition: graphics_threaded.h:94
@ CMD_RUNBUFFER
Definition: graphics_threaded.h:91
@ CMD_RENDER_QUAD_CONTAINER_EX
Definition: graphics_threaded.h:126
@ CMD_WINDOW_CREATE_NTF
Definition: graphics_threaded.h:140
@ CMDGROUP_CORE
Definition: graphics_threaded.h:82
@ CMD_RENDER_QUAD_CONTAINER
Definition: graphics_threaded.h:125
@ CMD_RENDER_TEXT
Definition: graphics_threaded.h:124
@ CMD_RENDER
Definition: graphics_threaded.h:105
@ CMD_UPDATE_BUFFER_CONTAINER
Definition: graphics_threaded.h:117
@ CMD_WINDOW_DESTROY_NTF
Definition: graphics_threaded.h:141
@ CMD_RENDER_TILE_LAYER
Definition: graphics_threaded.h:121
@ CMD_CLEAR
Definition: graphics_threaded.h:104
@ CMD_TEXT_TEXTURE_UPDATE
Definition: graphics_threaded.h:101
@ CMD_TRY_SWAP_AND_READ_PIXEL
Definition: graphics_threaded.h:135
@ CMD_SWAP
Definition: graphics_threaded.h:130
@ CMD_RENDER_QUAD_LAYER
Definition: graphics_threaded.h:123
@ CMDGROUP_PLATFORM_SDL
Definition: graphics_threaded.h:84
@ CMD_COUNT
Definition: graphics_threaded.h:143
@ CMD_NOP
Definition: graphics_threaded.h:88
@ CMD_FIRST
Definition: graphics_threaded.h:87
@ CMD_CREATE_BUFFER_OBJECT
Definition: graphics_threaded.h:109
@ CMD_DELETE_BUFFER_CONTAINER
Definition: graphics_threaded.h:116
@ CMD_DELETE_BUFFER_OBJECT
Definition: graphics_threaded.h:113
@ CMD_TRY_SWAP_AND_SCREENSHOT
Definition: graphics_threaded.h:136
@ CMD_TEXT_TEXTURES_CREATE
Definition: graphics_threaded.h:99
@ CMD_CREATE_BUFFER_CONTAINER
Definition: graphics_threaded.h:115
@ BLEND_NONE
Definition: graphics_threaded.h:168
@ BLEND_ALPHA
Definition: graphics_threaded.h:169
@ BLEND_ADDITIVE
Definition: graphics_threaded.h:170
@ WRAP_REPEAT
Definition: graphics_threaded.h:175
@ WRAP_CLAMP
Definition: graphics_threaded.h:176
size_t m_CommandCount
Definition: graphics_threaded.h:68
GL_SVertex SVertex
Definition: graphics_threaded.h:183
vec2 SPoint
Definition: graphics_threaded.h:179
GL_SColorf SColorf
Definition: graphics_threaded.h:181
SCommand * m_pCmdBufferTail
Definition: graphics_threaded.h:196
GL_SColor SColor
Definition: graphics_threaded.h:182
@ TEXFLAG_NOMIPMAPS
Definition: graphics_threaded.h:151
@ TEXFLAG_NO_2D_TEXTURE
Definition: graphics_threaded.h:154
@ TEXFORMAT_INVALID
Definition: graphics_threaded.h:148
@ TEXFLAG_TO_3D_TEXTURE
Definition: graphics_threaded.h:152
@ TEXFORMAT_RGBA
Definition: graphics_threaded.h:149
@ TEXFLAG_TO_2D_ARRAY_TEXTURE
Definition: graphics_threaded.h:153
void Reset()
Definition: graphics_threaded.h:643
GL_SVertexTex3DStream SVertexTex3DStream
Definition: graphics_threaded.h:185
CCommandBuffer(unsigned CmdBufferSize, unsigned DataBufferSize)
Definition: graphics_threaded.h:604
size_t m_RenderCallCount
Definition: graphics_threaded.h:69
void AddRenderCalls(size_t RenderCallCountToAdd)
Definition: graphics_threaded.h:653
CBuffer m_CmdBuffer
Definition: graphics_threaded.h:67
CBuffer m_DataBuffer
Definition: graphics_threaded.h:71
@ PRIMTYPE_TRIANGLES
Definition: graphics_threaded.h:163
@ PRIMTYPE_QUADS
Definition: graphics_threaded.h:162
@ PRIMTYPE_LINES
Definition: graphics_threaded.h:161
@ PRIMTYPE_INVALID
Definition: graphics_threaded.h:160
Definition: graphics_threaded.h:753
void AddVertices(int Count)
Definition: graphics_threaded.cpp:88
void Move(int x, int y) override
Definition: graphics_threaded.cpp:2519
ivec2 m_ReadPixelPosition
Definition: graphics_threaded.h:914
int Init() override
Definition: graphics_threaded.cpp:2362
void DrawRectExt(float x, float y, float w, float h, float r, int Corners) override
Definition: graphics_threaded.cpp:1015
void AddWarning(const SWarning &Warning)
Definition: graphics_threaded.cpp:2784
void WindowCreateNtf(uint32_t WindowId) override
Definition: graphics_threaded.cpp:2635
bool IsBackendInitialized() override
Definition: graphics_threaded.cpp:2813
std::optional< SWarning > CurrentWarning() override
Definition: graphics_threaded.cpp:2790
int m_TextureMemoryUsage
Definition: graphics_threaded.h:802
std::vector< WINDOW_PROPS_CHANGED_FUNC > m_vPropChangeListeners
Definition: graphics_threaded.h:857
int CreateBufferObject(size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false) override
Definition: graphics_threaded.cpp:1905
void CopyBufferObjectInternal(int WriteBufferIndex, int ReadBufferIndex, size_t WriteOffset, size_t ReadOffset, size_t CopyDataSize)
Definition: graphics_threaded.cpp:2037
int WindowOpen() override
Definition: graphics_threaded.cpp:2653
void DeleteQuadContainer(int &ContainerIndex) override
Definition: graphics_threaded.cpp:1619
void RenderQuadContainerAsSprite(int ContainerIndex, int QuadOffset, float X, float Y, float ScaleX=1.f, float ScaleY=1.f) override
Definition: graphics_threaded.cpp:1814
bool m_GLHasTextureArraysSupport
Definition: graphics_threaded.h:770
void DrawRect(float x, float y, float w, float h, ColorRGBA Color, int Corners, float Rounding) override
Definition: graphics_threaded.cpp:1290
bool GetDriverVersion(EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType) override
Definition: graphics_threaded.h:1254
std::mutex m_WarningsMutex
Definition: graphics_threaded.h:806
void QuadsTex3DEnd() override
Definition: graphics_threaded.cpp:742
int CreateQuadContainer(bool AutomaticUpload=true) override
Definition: graphics_threaded.cpp:1440
void LoadTextureAddWarning(size_t Width, size_t Height, int Flags, const char *pTexName)
Definition: graphics_threaded.cpp:353
int WindowActive() override
Definition: graphics_threaded.cpp:2648
void MapScreen(float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY) override
Definition: graphics_threaded.cpp:216
std::atomic< bool > m_WarnPngliteIncompatibleImages
Definition: graphics_threaded.h:804
void RenderQuadLayer(int BufferContainerIndex, SQuadRenderInfo *pQuadInfo, size_t QuadNum, int QuadOffset) override
Definition: graphics_threaded.cpp:1397
CCommandBuffer::SVertexTex3DStream m_aVerticesTex3D[CCommandBuffer::MAX_VERTICES]
Definition: graphics_threaded.h:785
void TakeScreenshot(const char *pFilename) override
Definition: graphics_threaded.cpp:2694
void QuadsBegin() override
Definition: graphics_threaded.cpp:720
CCommandBuffer::SState m_State
Definition: graphics_threaded.h:763
const char * GetVersionString() override
Definition: graphics_threaded.cpp:2823
void ReadPixelDirect(bool *pSwapped)
Definition: graphics_threaded.cpp:2677
const TTwGraphicsGpuList & GetGpus() const override
Definition: graphics_threaded.cpp:211
int InitWindow()
Definition: graphics_threaded.cpp:2235
void LinesBegin() override
Definition: graphics_threaded.cpp:232
IGraphics::CTextureHandle LoadTextureRawMove(CImageInfo &Image, int Flags, const char *pTexName=nullptr) override
Definition: graphics_threaded.cpp:409
const char * GetRendererString() override
Definition: graphics_threaded.cpp:2828
bool CheckImageDivisibility(const char *pContextName, CImageInfo &Image, int DivX, int DivY, bool AllowResize) override
Definition: graphics_threaded.cpp:567
int m_CurIndex
Definition: graphics_threaded.h:782
void QuadsEnd() override
Definition: graphics_threaded.cpp:730
IGraphicsBackend * m_pBackend
Definition: graphics_threaded.h:764
void SetColor4(ColorRGBA TopLeft, ColorRGBA TopRight, ColorRGBA BottomLeft, ColorRGBA BottomRight) override
Definition: graphics_threaded.cpp:823
virtual void RenderBorderTiles(int BufferContainerIndex, const ColorRGBA &Color, char *pIndexBufferOffset, const vec2 &Offset, const vec2 &Scale, uint32_t DrawNum) override
Definition: graphics_threaded.cpp:1376
std::vector< SWarning > m_vWarnings
Definition: graphics_threaded.h:807
void WindowDestroyNtf(uint32_t WindowId) override
Definition: graphics_threaded.cpp:2622
void AddBackEndWarningIfExists()
Definition: graphics_threaded.cpp:2224
void FlushVerticesTex3D() override
Definition: graphics_threaded.cpp:75
void LinesEnd() override
Definition: graphics_threaded.cpp:239
void UnloadTexture(IGraphics::CTextureHandle *pIndex) override
Definition: graphics_threaded.cpp:291
void TrianglesBegin() override
Definition: graphics_threaded.cpp:749
void BlendNormal() override
Definition: graphics_threaded.cpp:171
char m_aScreenshotName[IO_MAX_PATH_LENGTH]
Definition: graphics_threaded.h:796
void TrianglesEnd() override
Definition: graphics_threaded.cpp:759
void QuadsDrawFreeform(const CFreeformItem *pArray, int Num) override
Definition: graphics_threaded.cpp:916
CCommandBuffer::STexCoord m_aTexture[4]
Definition: graphics_threaded.h:789
void DeleteBufferContainer(int &ContainerIndex, bool DestroyAllBO=true) override
Definition: graphics_threaded.cpp:2096
bool SetMultiSampling(uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend) override
Definition: graphics_threaded.cpp:2747
void QuadsSetSubsetFree(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, int Index=-1) override
Definition: graphics_threaded.cpp:869
bool Uses2DTextureArrays() override
Definition: graphics_threaded.h:1260
int m_FirstFreeVertexArrayInfo
Definition: graphics_threaded.h:823
void TextureSet(CTextureHandle TextureId) override
Definition: graphics_threaded.cpp:702
void QuadsDrawTL(const CQuadItem *pArray, int Num) override
Definition: graphics_threaded.cpp:895
void QuadContainerUpload(int ContainerIndex) override
Definition: graphics_threaded.cpp:1464
bool SetVSync(bool State) override
Definition: graphics_threaded.cpp:2729
bool Resize(int w, int h, int RefreshRate) override
Definition: graphics_threaded.cpp:2537
void ResizeToScreen() override
Definition: graphics_threaded.cpp:2558
std::vector< WINDOW_RESIZE_FUNC > m_vResizeListeners
Definition: graphics_threaded.h:856
void WaitForIdle() override
Definition: graphics_threaded.cpp:2779
IGraphics::CTextureHandle LoadTexture(const char *pFilename, int StorageType, int Flags=0) override
Definition: graphics_threaded.cpp:434
class IStorage * m_pStorage
Definition: graphics_threaded.h:778
void Swap() override
Definition: graphics_threaded.cpp:2709
CTextureHandle m_NullTexture
Definition: graphics_threaded.h:798
void Shutdown() override
Definition: graphics_threaded.cpp:2448
size_t m_FirstFreeTexture
Definition: graphics_threaded.h:801
void QuadsEndKeepVertices() override
Definition: graphics_threaded.cpp:766
void ClipEnable(int x, int y, int w, int h) override
Definition: graphics_threaded.cpp:142
void BlendNone() override
Definition: graphics_threaded.cpp:166
TGLBackendReadPresentedImageData & GetReadPresentedImageDataFuncUnsafe() override
Definition: graphics_threaded.cpp:2833
bool IsConfigModernAPI() override
Definition: graphics_threaded.h:1255
void Maximize() override
Definition: graphics_threaded.cpp:2478
void RenderQuadContainer(int ContainerIndex, int QuadDrawNum) override
Definition: graphics_threaded.cpp:1632
void RenderText(int BufferContainerIndex, int TextQuadNum, int TextureSize, int TextureTextIndex, int TextureTextOutlineIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor) override
Definition: graphics_threaded.cpp:1420
ColorRGBA * m_pReadPixelColor
Definition: graphics_threaded.h:915
int m_Drawing
Definition: graphics_threaded.h:794
CGraphics_Threaded()
Definition: graphics_threaded.cpp:107
void AddWindowResizeListener(WINDOW_RESIZE_FUNC pFunc) override
Definition: graphics_threaded.cpp:2607
void KickCommandBuffer()
Definition: graphics_threaded.cpp:620
bool IsTextBufferingEnabled() override
Definition: graphics_threaded.h:1258
void RenderQuadContainerEx(int ContainerIndex, int QuadOffset, int QuadDrawNum, float X, float Y, float ScaleX=1.f, float ScaleY=1.f) override
Definition: graphics_threaded.cpp:1694
CCommandBuffer::SColor m_aColor[4]
Definition: graphics_threaded.h:788
class IConsole * m_pConsole
Definition: graphics_threaded.h:779
void FlushVertices(bool KeepVertices=false) override
Definition: graphics_threaded.cpp:62
float m_Rotation
Definition: graphics_threaded.h:793
void BlendAdditive() override
Definition: graphics_threaded.cpp:176
void Clear(float r, float g, float b, bool ForceClearNow=false) override
Definition: graphics_threaded.cpp:709
bool m_GLUses2DTextureArrays
Definition: graphics_threaded.h:769
void DrawRectExt4(float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, float r, int Corners) override
Definition: graphics_threaded.cpp:1084
int m_FirstFreeBufferObjectIndex
Definition: graphics_threaded.h:826
void RenderQuadContainerAsSpriteMultiple(int ContainerIndex, int QuadOffset, int DrawCount, SRenderSpriteInfo *pRenderInfo) override
Definition: graphics_threaded.cpp:1819
void DeleteBufferObject(int BufferIndex) override
Definition: graphics_threaded.cpp:2048
void QuadsSetRotation(float Angle) override
Definition: graphics_threaded.cpp:780
int m_NumVertices
Definition: graphics_threaded.h:786
bool m_RenderEnable
Definition: graphics_threaded.h:791
bool IsQuadBufferingEnabled() override
Definition: graphics_threaded.h:1257
void WrapClamp() override
Definition: graphics_threaded.cpp:186
CCommandBuffer * m_pCommandBuffer
Definition: graphics_threaded.h:774
void ReadPixel(ivec2 Position, ColorRGBA *pColor) override
Definition: graphics_threaded.cpp:2668
int GetNumScreens() const override
Definition: graphics_threaded.cpp:2460
int GetVideoModes(CVideoMode *pModes, int MaxModes, int Screen) override
Definition: graphics_threaded.cpp:2838
std::vector< int > m_vTextureIndices
Definition: graphics_threaded.h:800
void QuadsDrawCurrentVertices(bool KeepVertices=true) override
Definition: graphics_threaded.cpp:773
void QuadContainerChangeAutomaticUpload(int ContainerIndex, bool AutomaticUpload) override
Definition: graphics_threaded.cpp:1458
void RenderTileLayer(int BufferContainerIndex, const ColorRGBA &Color, char **pOffsets, unsigned int *pIndicedVertexDrawNum, size_t NumIndicesOffset) override
Definition: graphics_threaded.cpp:1332
void WrapNormal() override
Definition: graphics_threaded.cpp:181
const char * GetScreenName(int Screen) const override
Definition: graphics_threaded.cpp:2465
bool m_GLQuadBufferingEnabled
Definition: graphics_threaded.h:766
bool UpdateTextTexture(CTextureHandle TextureId, int x, int y, size_t Width, size_t Height, uint8_t *pData, bool IsMovedPointer) override
Definition: graphics_threaded.cpp:487
bool m_GLTileBufferingEnabled
Definition: graphics_threaded.h:765
bool m_DoScreenshot
Definition: graphics_threaded.h:795
bool SetWindowScreen(int Index) override
Definition: graphics_threaded.cpp:2503
void ScreenshotDirect(bool *pSwapped)
Definition: graphics_threaded.cpp:678
void RecreateBufferObject(int BufferIndex, size_t UploadDataSize, void *pUploadData, int CreateFlags, bool IsMovedPointer=false) override
Definition: graphics_threaded.cpp:1965
void QuadsSetSubset(float TlU, float TlV, float BrU, float BrV) override
Definition: graphics_threaded.cpp:856
void UpdateBufferContainerInternal(int ContainerIndex, SBufferContainerInfo *pContainerInfo)
Definition: graphics_threaded.cpp:2125
void WarnPngliteIncompatibleImages(bool Warn) override
Definition: graphics_threaded.cpp:2487
uint64_t TextureMemoryUsage() const override
Definition: graphics_threaded.cpp:191
unsigned m_CurrentCommandBuffer
Definition: graphics_threaded.h:775
void * AllocCommandBufferData(size_t AllocSize)
Definition: graphics_threaded.cpp:1886
CCommandBuffer * m_apCommandBuffers[NUM_CMDBUFFERS]
Definition: graphics_threaded.h:773
const char * GetVendorString() override
Definition: graphics_threaded.cpp:2818
int GetWindowScreen() override
Definition: graphics_threaded.cpp:2617
void DrawRect4(float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, int Corners, float Rounding) override
Definition: graphics_threaded.cpp:1299
std::vector< int > m_vBufferObjectIndices
Definition: graphics_threaded.h:825
bool m_GLQuadContainerBufferingEnabled
Definition: graphics_threaded.h:768
void UpdateBufferObjectInternal(int BufferIndex, size_t UploadDataSize, void *pUploadData, void *pOffset, bool IsMovedPointer=false)
Definition: graphics_threaded.cpp:2011
bool HasTextureArraysSupport() override
Definition: graphics_threaded.h:1261
bool IsIdle() const override
Definition: graphics_threaded.cpp:2774
bool IsTileBufferingEnabled() override
Definition: graphics_threaded.h:1256
void GetCurrentVideoMode(CVideoMode &CurMode, int Screen) override
Definition: graphics_threaded.cpp:2852
uint64_t StreamedMemoryUsage() const override
Definition: graphics_threaded.cpp:201
uint64_t StagingMemoryUsage() const override
Definition: graphics_threaded.cpp:206
bool LoadTextTextures(size_t Width, size_t Height, CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture, uint8_t *pTextData, uint8_t *pTextOutlineData) override
Definition: graphics_threaded.cpp:453
void UpdateViewport(int X, int Y, int W, int H, bool ByResize) override
Definition: graphics_threaded.cpp:2213
bool IsSpriteTextureFullyTransparent(const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite) override
Definition: graphics_threaded.cpp:342
void ClipDisable() override
Definition: graphics_threaded.cpp:161
void QuadsDraw(CQuadItem *pArray, int Num) override
Definition: graphics_threaded.cpp:884
bool m_GLTextBufferingEnabled
Definition: graphics_threaded.h:767
bool ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg) override
Definition: graphics_threaded.cpp:2805
bool IsImageFormatRgba(const char *pContextName, const CImageInfo &Image) override
Definition: graphics_threaded.cpp:605
int CreateBufferContainer(SBufferContainerInfo *pContainerInfo) override
Definition: graphics_threaded.cpp:2062
int CreateRectQuadContainer(float x, float y, float w, float h, float r, int Corners) override
Definition: graphics_threaded.cpp:1202
void FlushVerticesImpl(bool KeepVertices, int &PrimType, size_t &PrimCount, size_t &NumVerts, TName &Command, size_t VertSize)
Definition: graphics_threaded.h:1129
void IndicesNumRequiredNotify(unsigned int RequiredIndicesCount) override
Definition: graphics_threaded.cpp:2144
void AddCmd(TName &Cmd, std::function< bool()> FailFunc=[] { return true;})
Definition: graphics_threaded.h:884
void SetWindowGrab(bool Grab) override
Definition: graphics_threaded.cpp:2658
bool LoadPng(CImageInfo &Image, const char *pFilename, int StorageType) override
Definition: graphics_threaded.cpp:536
void AdjustViewport(bool SendViewportChangeToBackend)
Definition: graphics_threaded.cpp:2193
CCommandBuffer::SVertex m_aVertices[CCommandBuffer::MAX_VERTICES]
Definition: graphics_threaded.h:784
int m_FirstFreeQuadContainer
Definition: graphics_threaded.h:854
int QuadContainerAddQuads(int ContainerIndex, CQuadItem *pArray, int Num) override
Definition: graphics_threaded.cpp:1516
std::vector< SQuadContainer > m_vQuadContainers
Definition: graphics_threaded.h:853
void QuadsDrawTLImpl(TName *pVertices, const CQuadItem *pArray, int Num)
Definition: graphics_threaded.h:1011
void AddWindowPropChangeListener(WINDOW_PROPS_CHANGED_FUNC pFunc) override
Definition: graphics_threaded.cpp:2612
bool m_GLUseTrianglesAsQuad
Definition: graphics_threaded.h:771
class IEngine * m_pEngine
Definition: graphics_threaded.h:780
void FreeTextureIndex(CTextureHandle *pIndex)
Definition: graphics_threaded.cpp:281
void QuadsText(float x, float y, float Size, const char *pText) override
Definition: graphics_threaded.cpp:986
virtual int GetDesktopScreenHeight() const
Definition: graphics_threaded.h:1241
void ChangeColorOfCurrentQuadVertices(float r, float g, float b, float a) override
Definition: graphics_threaded.cpp:833
void SetColor(TName *pVertex, int ColorIndex)
Definition: graphics_threaded.h:988
void TakeCustomScreenshot(const char *pFilename) override
Definition: graphics_threaded.cpp:2703
bool UnloadTextTextures(CTextureHandle &TextTexture, CTextureHandle &TextOutlineTexture) override
Definition: graphics_threaded.cpp:473
bool m_IsForcedViewport
Definition: graphics_threaded.h:811
void SetColorVertex(const CColorVertex *pArray, size_t Num) override
Definition: graphics_threaded.cpp:790
IGraphics::CTextureHandle LoadTextureRaw(const CImageInfo &Image, int Flags, const char *pTexName=nullptr) override
Definition: graphics_threaded.cpp:386
void LinesDraw(const CLineItem *pArray, int Num) override
Definition: graphics_threaded.cpp:246
void SetWindowParams(int FullscreenMode, bool IsBorderless) override
Definition: graphics_threaded.cpp:2492
IGraphics::CTextureHandle FindFreeTextureIndex()
Definition: graphics_threaded.cpp:266
void GotResized(int w, int h, int RefreshRate) override
Definition: graphics_threaded.cpp:2569
std::vector< SVertexArrayInfo > m_vVertexArrayInfo
Definition: graphics_threaded.h:822
bool IsImageSubFullyTransparent(const CImageInfo &FromImageInfo, int x, int y, int w, int h) override
Definition: graphics_threaded.cpp:321
void NotifyWindow() override
Definition: graphics_threaded.cpp:2663
CTextureHandle LoadSpriteTexture(const CImageInfo &FromImageInfo, const struct CDataSprite *pSprite) override
Definition: graphics_threaded.cpp:303
int IssueInit()
Definition: graphics_threaded.cpp:2151
void QuadContainerReset(int ContainerIndex) override
Definition: graphics_threaded.cpp:1607
uint64_t BufferMemoryUsage() const override
Definition: graphics_threaded.cpp:196
void Rotate(const CCommandBuffer::SPoint &rCenter, TName *pPoints, int NumPoints)
Definition: graphics_threaded.h:866
void ChangeColorOfQuadVertices(size_t QuadOffset, unsigned char r, unsigned char g, unsigned char b, unsigned char a) override
Definition: graphics_threaded.cpp:846
void GetScreen(float *pTopLeftX, float *pTopLeftY, float *pBottomRightX, float *pBottomRightY) override
Definition: graphics_threaded.cpp:224
void QuadsTex3DBegin() override
Definition: graphics_threaded.cpp:737
void QuadsTex3DDrawTL(const CQuadItem *pArray, int Num) override
Definition: graphics_threaded.cpp:900
@ DRAWING_LINES
Definition: graphics_threaded.h:759
@ NUM_CMDBUFFERS
Definition: graphics_threaded.h:756
@ DRAWING_TRIANGLES
Definition: graphics_threaded.h:760
@ DRAWING_QUADS
Definition: graphics_threaded.h:758
bool IsQuadContainerBufferingEnabled() override
Definition: graphics_threaded.h:1259
virtual int GetDesktopScreenWidth() const
Definition: graphics_threaded.h:1240
void DrawCircle(float CenterX, float CenterY, float Radius, int Segments) override
Definition: graphics_threaded.cpp:1307
void Minimize() override
Definition: graphics_threaded.cpp:2470
void InsertSignal(CSemaphore *pSemaphore) override
Definition: graphics_threaded.cpp:2767
Definition: threading.h:8
Definition: graphics.h:73
Definition: graphics.h:487
Definition: graphics_threaded.h:675
virtual int WindowActive()=0
virtual bool HasTextureArraysSupport()
Definition: graphics_threaded.h:736
virtual bool HasTileBuffering()
Definition: graphics_threaded.h:731
virtual const char * GetErrorString()
Definition: graphics_threaded.h:737
virtual bool ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg)=0
virtual bool UpdateDisplayMode(int Index)=0
virtual bool GetWarning(std::vector< std::string > &WarningStrings)=0
virtual bool IsConfigModernAPI()
Definition: graphics_threaded.h:729
virtual uint64_t StagingMemoryUsage() const =0
virtual void GetViewportSize(int &w, int &h)=0
virtual int GetWindowScreen()=0
virtual const char * GetVendorString()=0
virtual const char * GetScreenName(int Screen) const =0
virtual void WindowCreateNtf(uint32_t WindowId)=0
virtual void RunBuffer(CCommandBuffer *pBuffer)=0
virtual bool ResizeWindow(int w, int h, int RefreshRate)=0
virtual void NotifyWindow()=0
virtual void GetCurrentVideoMode(CVideoMode &CurMode, int HiDPIScale, int MaxWindowWidth, int MaxWindowHeight, int Screen)=0
virtual bool UseTrianglesAsQuad()
Definition: graphics_threaded.h:730
virtual bool HasQuadContainerBuffering()
Definition: graphics_threaded.h:734
virtual void Minimize()=0
virtual void SetWindowGrab(bool Grab)=0
virtual uint64_t StreamedMemoryUsage() const =0
virtual const char * GetRendererString()=0
virtual void RunBufferSingleThreadedUnsafe(CCommandBuffer *pBuffer)=0
virtual const char * GetVersionString()=0
virtual int Init(const char *pName, int *pScreen, int *pWidth, int *pHeight, int *pRefreshRate, int *pFsaaSamples, int Flags, int *pDesktopWidth, int *pDesktopHeight, int *pCurrentWidth, int *pCurrentHeight, class IStorage *pStorage)=0
@ INITFLAG_BORDERLESS
Definition: graphics_threaded.h:682
@ INITFLAG_FULLSCREEN
Definition: graphics_threaded.h:679
@ INITFLAG_DESKTOP_FULLSCREEN
Definition: graphics_threaded.h:684
@ INITFLAG_VSYNC
Definition: graphics_threaded.h:680
@ INITFLAG_RESIZABLE
Definition: graphics_threaded.h:681
@ INITFLAG_HIGHDPI
Definition: graphics_threaded.h:683
virtual void WindowDestroyNtf(uint32_t WindowId)=0
virtual bool GetDriverVersion(EGraphicsDriverAgeType DriverAgeType, int &Major, int &Minor, int &Patch, const char *&pName, EBackendType BackendType)=0
virtual ~IGraphicsBackend()=default
virtual int WindowOpen()=0
virtual uint64_t TextureMemoryUsage() const =0
virtual void Maximize()=0
virtual void WaitForIdle()=0
virtual bool Uses2DTextureArrays()
Definition: graphics_threaded.h:735
virtual bool SetWindowScreen(int Index)=0
virtual void SetWindowParams(int FullscreenMode, bool IsBorderless)=0
virtual uint64_t BufferMemoryUsage() const =0
virtual bool HasTextBuffering()
Definition: graphics_threaded.h:733
virtual void GetVideoModes(CVideoMode *pModes, int MaxModes, int *pNumModes, int HiDPIScale, int MaxWindowWidth, int MaxWindowHeight, int Screen)=0
virtual TGLBackendReadPresentedImageData & GetReadPresentedImageDataFuncUnsafe()=0
virtual int GetNumScreens() const =0
virtual const TTwGraphicsGpuList & GetGpus() const =0
virtual bool IsIdle() const =0
virtual bool HasQuadBuffering()
Definition: graphics_threaded.h:732
Definition: graphics.h:201
T x
Definition: vmath.h:19
T y
Definition: vmath.h:23
CConfig g_Config
Definition: config.cpp:12
static SHA256_DIGEST s(const char *pSha256)
Definition: mapbugs.cpp:37
EBackendType
Definition: graphics.h:143
EGraphicsDriverAgeType
Definition: graphics.h:134
std::function< bool(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector< uint8_t > &vDstData)> TGLBackendReadPresentedImageData
Definition: graphics.h:181
std::function< void()> WINDOW_RESIZE_FUNC
Definition: graphics.h:178
std::function< void()> WINDOW_PROPS_CHANGED_FUNC
Definition: graphics.h:179
std::function< const char *(const char *, const char *)> TTranslateFunc
Definition: graphics_threaded.h:1270
constexpr int CMD_BUFFER_DATA_BUFFER_SIZE
Definition: graphics_threaded.h:15
IGraphicsBackend * CreateGraphicsBackend(TTranslateFunc &&TranslateFunc)
Definition: backend_sdl.cpp:1647
constexpr int CMD_BUFFER_CMD_BUFFER_SIZE
Definition: graphics_threaded.h:16
EGraphicsBackendErrorCodes
Definition: graphics_threaded.h:660
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_INFO_REQUEST_FAILED
Definition: graphics_threaded.h:667
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_INIT_FAILED
Definition: graphics_threaded.h:665
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_RESOLUTION_REQUEST_FAILED
Definition: graphics_threaded.h:668
@ GRAPHICS_BACKEND_ERROR_CODE_NONE
Definition: graphics_threaded.h:662
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_WINDOW_CREATE_FAILED
Definition: graphics_threaded.h:669
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_REQUEST_FAILED
Definition: graphics_threaded.h:666
@ GRAPHICS_BACKEND_ERROR_CODE_GL_VERSION_FAILED
Definition: graphics_threaded.h:664
@ GRAPHICS_BACKEND_ERROR_CODE_GL_CONTEXT_FAILED
Definition: graphics_threaded.h:663
@ GRAPHICS_BACKEND_ERROR_CODE_UNKNOWN
Definition: graphics_threaded.h:661
#define dbg_assert(test, msg)
Definition: system.h:76
Definition: graphics_threaded.h:215
SColorf m_Color
Definition: graphics_threaded.h:218
SCommand_Clear()
Definition: graphics_threaded.h:216
bool m_ForceClear
Definition: graphics_threaded.h:219
Definition: graphics_threaded.h:298
SCommand_CopyBufferObject()
Definition: graphics_threaded.h:299
size_t m_WriteOffset
Definition: graphics_threaded.h:306
int m_WriteBufferIndex
Definition: graphics_threaded.h:302
int m_ReadBufferIndex
Definition: graphics_threaded.h:303
size_t m_ReadOffset
Definition: graphics_threaded.h:305
size_t m_CopySize
Definition: graphics_threaded.h:307
Definition: graphics_threaded.h:319
SCommand_CreateBufferContainer()
Definition: graphics_threaded.h:320
int m_Stride
Definition: graphics_threaded.h:325
int m_VertBufferBindingIndex
Definition: graphics_threaded.h:326
int m_BufferContainerIndex
Definition: graphics_threaded.h:323
size_t m_AttrCount
Definition: graphics_threaded.h:328
SBufferContainerInfo::SAttribute * m_pAttributes
Definition: graphics_threaded.h:329
Definition: graphics_threaded.h:257
size_t m_DataSize
Definition: graphics_threaded.h:265
void * m_pUploadData
Definition: graphics_threaded.h:264
int m_BufferIndex
Definition: graphics_threaded.h:261
bool m_DeletePointer
Definition: graphics_threaded.h:263
SCommand_CreateBufferObject()
Definition: graphics_threaded.h:258
int m_Flags
Definition: graphics_threaded.h:267
Definition: graphics_threaded.h:347
int m_BufferContainerIndex
Definition: graphics_threaded.h:351
bool m_DestroyAllBO
Definition: graphics_threaded.h:352
SCommand_DeleteBufferContainer()
Definition: graphics_threaded.h:348
Definition: graphics_threaded.h:311
SCommand_DeleteBufferObject()
Definition: graphics_threaded.h:312
int m_BufferIndex
Definition: graphics_threaded.h:315
Definition: graphics_threaded.h:356
SCommand_IndicesRequiredNumNotify()
Definition: graphics_threaded.h:357
unsigned int m_RequiredIndicesNum
Definition: graphics_threaded.h:360
Definition: graphics_threaded.h:501
SCommand_MultiSampling()
Definition: graphics_threaded.h:502
bool * m_pRetOk
Definition: graphics_threaded.h:507
uint32_t * m_pRetMultiSamplingCount
Definition: graphics_threaded.h:506
uint32_t m_RequestedMultiSamplingCount
Definition: graphics_threaded.h:505
Definition: graphics_threaded.h:271
void * m_pUploadData
Definition: graphics_threaded.h:278
int m_BufferIndex
Definition: graphics_threaded.h:275
int m_Flags
Definition: graphics_threaded.h:281
size_t m_DataSize
Definition: graphics_threaded.h:279
bool m_DeletePointer
Definition: graphics_threaded.h:277
SCommand_RecreateBufferObject()
Definition: graphics_threaded.h:272
Definition: graphics_threaded.h:379
SState m_State
Definition: graphics_threaded.h:382
uint32_t m_DrawNum
Definition: graphics_threaded.h:385
char * m_pIndicesOffset
Definition: graphics_threaded.h:384
vec2 m_Offset
Definition: graphics_threaded.h:388
SColorf m_Color
Definition: graphics_threaded.h:383
SCommand_RenderBorderTile()
Definition: graphics_threaded.h:380
int m_BufferContainerIndex
Definition: graphics_threaded.h:386
vec2 m_Scale
Definition: graphics_threaded.h:389
Definition: graphics_threaded.h:451
SCommand_RenderQuadContainerAsSpriteMultiple()
Definition: graphics_threaded.h:452
SPoint m_Center
Definition: graphics_threaded.h:460
int m_BufferContainerIndex
Definition: graphics_threaded.h:456
unsigned int m_DrawNum
Definition: graphics_threaded.h:463
unsigned int m_DrawCount
Definition: graphics_threaded.h:464
SState m_State
Definition: graphics_threaded.h:454
void * m_pOffset
Definition: graphics_threaded.h:465
IGraphics::SRenderSpriteInfo * m_pRenderInfo
Definition: graphics_threaded.h:458
SColorf m_VertexColor
Definition: graphics_threaded.h:461
Definition: graphics_threaded.h:434
int m_BufferContainerIndex
Definition: graphics_threaded.h:439
void * m_pOffset
Definition: graphics_threaded.h:447
SPoint m_Center
Definition: graphics_threaded.h:442
SState m_State
Definition: graphics_threaded.h:437
float m_Rotation
Definition: graphics_threaded.h:441
SCommand_RenderQuadContainerEx()
Definition: graphics_threaded.h:435
unsigned int m_DrawNum
Definition: graphics_threaded.h:446
SColorf m_VertexColor
Definition: graphics_threaded.h:444
Definition: graphics_threaded.h:422
unsigned int m_DrawNum
Definition: graphics_threaded.h:429
SCommand_RenderQuadContainer()
Definition: graphics_threaded.h:423
void * m_pOffset
Definition: graphics_threaded.h:430
int m_BufferContainerIndex
Definition: graphics_threaded.h:427
SState m_State
Definition: graphics_threaded.h:425
Definition: graphics_threaded.h:393
int m_QuadOffset
Definition: graphics_threaded.h:401
SCommand_RenderQuadLayer()
Definition: graphics_threaded.h:394
SState m_State
Definition: graphics_threaded.h:396
int m_BufferContainerIndex
Definition: graphics_threaded.h:398
SQuadRenderInfo * m_pQuadInfo
Definition: graphics_threaded.h:399
size_t m_QuadNum
Definition: graphics_threaded.h:400
Definition: graphics_threaded.h:247
unsigned m_PrimCount
Definition: graphics_threaded.h:252
SVertexTex3DStream * m_pVertices
Definition: graphics_threaded.h:253
SCommand_RenderTex3D()
Definition: graphics_threaded.h:248
unsigned m_PrimType
Definition: graphics_threaded.h:251
SState m_State
Definition: graphics_threaded.h:250
Definition: graphics_threaded.h:405
ColorRGBA m_TextOutlineColor
Definition: graphics_threaded.h:418
ColorRGBA m_TextColor
Definition: graphics_threaded.h:417
SCommand_RenderText()
Definition: graphics_threaded.h:406
int m_TextureSize
Definition: graphics_threaded.h:411
int m_DrawNum
Definition: graphics_threaded.h:416
int m_TextOutlineTextureIndex
Definition: graphics_threaded.h:414
int m_TextTextureIndex
Definition: graphics_threaded.h:413
SState m_State
Definition: graphics_threaded.h:408
int m_BufferContainerIndex
Definition: graphics_threaded.h:410
Definition: graphics_threaded.h:364
int m_BufferContainerIndex
Definition: graphics_threaded.h:375
SColorf m_Color
Definition: graphics_threaded.h:368
char ** m_pIndicesOffsets
Definition: graphics_threaded.h:371
int m_IndicesDrawNum
Definition: graphics_threaded.h:374
SState m_State
Definition: graphics_threaded.h:367
SCommand_RenderTileLayer()
Definition: graphics_threaded.h:365
unsigned int * m_pDrawCount
Definition: graphics_threaded.h:372
Definition: graphics_threaded.h:237
SVertex * m_pVertices
Definition: graphics_threaded.h:243
SState m_State
Definition: graphics_threaded.h:240
unsigned m_PrimCount
Definition: graphics_threaded.h:242
SCommand_Render()
Definition: graphics_threaded.h:238
unsigned m_PrimType
Definition: graphics_threaded.h:241
Definition: graphics_threaded.h:230
CCommandBuffer * m_pOtherBuffer
Definition: graphics_threaded.h:233
SCommand_RunBuffer()
Definition: graphics_threaded.h:231
Definition: graphics_threaded.h:223
SCommand_Signal()
Definition: graphics_threaded.h:224
CSemaphore * m_pSemaphore
Definition: graphics_threaded.h:226
Definition: graphics_threaded.h:486
SCommand_Swap()
Definition: graphics_threaded.h:487
Definition: graphics_threaded.h:573
uint8_t * m_pData
Definition: graphics_threaded.h:584
SCommand_TextTexture_Update()
Definition: graphics_threaded.h:574
size_t m_Width
Definition: graphics_threaded.h:582
int m_Slot
Definition: graphics_threaded.h:578
int m_X
Definition: graphics_threaded.h:580
int m_Y
Definition: graphics_threaded.h:581
size_t m_Height
Definition: graphics_threaded.h:583
Definition: graphics_threaded.h:547
SCommand_TextTextures_Create()
Definition: graphics_threaded.h:548
int m_SlotOutline
Definition: graphics_threaded.h:553
size_t m_Width
Definition: graphics_threaded.h:555
uint8_t * m_pTextData
Definition: graphics_threaded.h:558
uint8_t * m_pTextOutlineData
Definition: graphics_threaded.h:559
size_t m_Height
Definition: graphics_threaded.h:556
int m_Slot
Definition: graphics_threaded.h:552
Definition: graphics_threaded.h:563
int m_Slot
Definition: graphics_threaded.h:568
int m_SlotOutline
Definition: graphics_threaded.h:569
SCommand_TextTextures_Destroy()
Definition: graphics_threaded.h:564
Definition: graphics_threaded.h:523
SCommand_Texture_Create()
Definition: graphics_threaded.h:524
size_t m_Height
Definition: graphics_threaded.h:531
uint8_t * m_pData
Definition: graphics_threaded.h:534
size_t m_Width
Definition: graphics_threaded.h:530
int m_Flags
Definition: graphics_threaded.h:532
int m_Slot
Definition: graphics_threaded.h:528
Definition: graphics_threaded.h:538
SCommand_Texture_Destroy()
Definition: graphics_threaded.h:539
int m_Slot
Definition: graphics_threaded.h:543
Definition: graphics_threaded.h:469
ivec2 m_Position
Definition: graphics_threaded.h:472
bool * m_pSwapped
Definition: graphics_threaded.h:474
SColorf * m_pColor
Definition: graphics_threaded.h:473
SCommand_TrySwapAndReadPixel()
Definition: graphics_threaded.h:470
Definition: graphics_threaded.h:478
CImageInfo * m_pImage
Definition: graphics_threaded.h:481
SCommand_TrySwapAndScreenshot()
Definition: graphics_threaded.h:479
bool * m_pSwapped
Definition: graphics_threaded.h:482
Definition: graphics_threaded.h:333
SBufferContainerInfo::SAttribute * m_pAttributes
Definition: graphics_threaded.h:343
int m_VertBufferBindingIndex
Definition: graphics_threaded.h:340
int m_BufferContainerIndex
Definition: graphics_threaded.h:337
SCommand_UpdateBufferContainer()
Definition: graphics_threaded.h:334
int m_Stride
Definition: graphics_threaded.h:339
size_t m_AttrCount
Definition: graphics_threaded.h:342
Definition: graphics_threaded.h:285
SCommand_UpdateBufferObject()
Definition: graphics_threaded.h:286
size_t m_DataSize
Definition: graphics_threaded.h:294
void * m_pUploadData
Definition: graphics_threaded.h:293
int m_BufferIndex
Definition: graphics_threaded.h:289
bool m_DeletePointer
Definition: graphics_threaded.h:291
void * m_pOffset
Definition: graphics_threaded.h:292
Definition: graphics_threaded.h:511
SCommand_Update_Viewport()
Definition: graphics_threaded.h:512
int m_Height
Definition: graphics_threaded.h:518
int m_X
Definition: graphics_threaded.h:515
bool m_ByResize
Definition: graphics_threaded.h:519
int m_Width
Definition: graphics_threaded.h:517
int m_Y
Definition: graphics_threaded.h:516
Definition: graphics_threaded.h:492
int m_VSync
Definition: graphics_threaded.h:496
SCommand_VSync()
Definition: graphics_threaded.h:493
bool * m_pRetOk
Definition: graphics_threaded.h:497
Definition: graphics_threaded.h:588
uint32_t m_WindowId
Definition: graphics_threaded.h:592
SCommand_WindowCreateNtf()
Definition: graphics_threaded.h:589
Definition: graphics_threaded.h:596
SCommand_WindowDestroyNtf()
Definition: graphics_threaded.h:597
uint32_t m_WindowId
Definition: graphics_threaded.h:600
Definition: graphics_threaded.h:188
SCommand(unsigned Cmd)
Definition: graphics_threaded.h:190
SCommand * m_pNext
Definition: graphics_threaded.h:193
unsigned m_Cmd
Definition: graphics_threaded.h:192
Definition: graphics_threaded.h:199
bool m_ClipEnable
Definition: graphics_threaded.h:207
int m_Texture
Definition: graphics_threaded.h:202
int m_WrapMode
Definition: graphics_threaded.h:201
int m_ClipW
Definition: graphics_threaded.h:210
SPoint m_ScreenTL
Definition: graphics_threaded.h:203
int m_BlendMode
Definition: graphics_threaded.h:200
SPoint m_ScreenBR
Definition: graphics_threaded.h:204
int m_ClipY
Definition: graphics_threaded.h:209
int m_ClipH
Definition: graphics_threaded.h:211
int m_ClipX
Definition: graphics_threaded.h:208
Definition: client_data.h:29
Definition: graphics_threaded.h:840
CCommandBuffer::SVertex m_aVertices[4]
Definition: graphics_threaded.h:841
Definition: graphics_threaded.h:829
int m_FreeIndex
Definition: graphics_threaded.h:849
int m_QuadBufferObjectIndex
Definition: graphics_threaded.h:846
std::vector< SQuad > m_vQuads
Definition: graphics_threaded.h:844
int m_QuadBufferContainerIndex
Definition: graphics_threaded.h:847
bool m_AutomaticUpload
Definition: graphics_threaded.h:851
SQuadContainer(bool AutomaticUpload=true)
Definition: graphics_threaded.h:830
Definition: graphics_threaded.h:814
SVertexArrayInfo()
Definition: graphics_threaded.h:815
int m_AssociatedBufferObjectIndex
Definition: graphics_threaded.h:818
int m_FreeIndex
Definition: graphics_threaded.h:820
Definition: graphics.h:124
Definition: graphics.h:117
Definition: graphics.h:110
Definition: graphics.h:337
Definition: graphics.h:368
float m_Y
Definition: graphics.h:369
float m_Height
Definition: graphics.h:369
float m_X
Definition: graphics.h:369
float m_Width
Definition: graphics.h:369
Definition: graphics.h:392
Definition: graphics.h:32
Definition: graphics.h:26
Definition: graphics.h:45
Definition: graphics.h:155
#define str_format
Definition: system.cpp:2830
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
vector2_base< int > ivec2
Definition: vmath.h:160