1#ifndef ENGINE_CLIENT_GRAPHICS_THREADED_H
2#define ENGINE_CLIENT_GRAPHICS_THREADED_H
44 void *
Alloc(
unsigned Requested,
unsigned Alignment =
alignof(std::max_align_t))
46 size_t Offset =
reinterpret_cast<uintptr_t
>(
m_pData +
m_Used) % Alignment;
48 Offset = Alignment - Offset;
54 m_Used += Requested + Offset;
615 (void)
static_cast<const SCommand *
>(&Command);
622 pCmd->m_pNext =
nullptr;
686 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;
696 virtual void GetVideoModes(
CVideoMode *pModes,
int MaxModes,
int *pNumModes,
int HiDPIScale,
int MaxWindowWidth,
int MaxWindowHeight,
int Screen) = 0;
743 virtual bool GetWarning(std::vector<std::string> &WarningStrings) = 0;
746 virtual bool ShowMessageBox(
unsigned Type,
const char *pTitle,
const char *pMsg) = 0;
861 template<
typename TName>
869 TName *pVertices = pPoints;
870 for(i = 0; i < NumPoints; i++)
872 x = pVertices[i].m_Pos.x - rCenter.
x;
873 y = pVertices[i].m_Pos.y - rCenter.
y;
874 pVertices[i].m_Pos.x = x * c - y *
s + rCenter.
x;
875 pVertices[i].m_Pos.y = x *
s + y * c + rCenter.
y;
879 template<
typename TName>
881 TName &Cmd, std::function<
bool()> FailFunc = [] {
return true; })
892 str_format(aError,
sizeof(aError),
"graphics: failed to run fail handler for command '%s'",
typeid(TName).name());
899 str_format(aError,
sizeof(aError),
"graphics: failed to add command '%s' to command buffer",
typeid(TName).name());
921 void ClipEnable(
int x,
int y,
int w,
int h)
override;
938 void MapScreen(
float TopLeftX,
float TopLeftY,
float BottomRightX,
float BottomRightY)
override;
939 void GetScreen(
float *pTopLeftX,
float *pTopLeftY,
float *pBottomRightX,
float *pBottomRightY)
override;
962 bool LoadPng(
CImageInfo &Image,
const char *pFilename,
int StorageType)
override;
963 bool LoadPng(
CImageInfo &Image,
const uint8_t *pData,
size_t DataSize,
const char *pContextName)
override;
970 void Clear(
float r,
float g,
float b,
bool ForceClearNow =
false)
override;
982 template<
typename TName>
985 TName *pVert = pVertex;
986 pVert->m_Color =
m_aColor[ColorIndex];
989 void SetColorVertex(
const CColorVertex *pArray,
size_t Num)
override;
990 void SetColor(
float r,
float g,
float b,
float a)
override;
996 void ChangeColorOfQuadVertices(
size_t QuadOffset,
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a)
override;
998 void QuadsSetSubset(
float TlU,
float TlV,
float BrU,
float BrV)
override;
1000 float x0,
float y0,
float x1,
float y1,
1001 float x2,
float y2,
float x3,
float y3,
int Index = -1)
override;
1003 void QuadsDraw(CQuadItem *pArray,
int Num)
override;
1005 template<
typename TName>
1014 for(
int i = 0; i < Num; ++i)
1061 for(
int i = 0; i < Num; ++i)
1096 void QuadsDrawTL(
const CQuadItem *pArray,
int Num)
override;
1101 void QuadsText(
float x,
float y,
float Size,
const char *pText)
override;
1103 void DrawRectExt(
float x,
float y,
float w,
float h,
float r,
int Corners)
override;
1106 void DrawRect(
float x,
float y,
float w,
float h,
ColorRGBA Color,
int Corners,
float Rounding)
override;
1108 void DrawCircle(
float CenterX,
float CenterY,
float Radius,
int Segments)
override;
1128 void RenderQuadContainer(
int ContainerIndex,
int QuadOffset,
int QuadDrawNum,
bool ChangeWrapMode =
true)
override;
1129 void RenderQuadContainerEx(
int ContainerIndex,
int QuadOffset,
int QuadDrawNum,
float X,
float Y,
float ScaleX = 1.f,
float ScaleY = 1.f)
override;
1130 void RenderQuadContainerAsSprite(
int ContainerIndex,
int QuadOffset,
float X,
float Y,
float ScaleX = 1.f,
float ScaleY = 1.f)
override;
1133 template<
typename TName>
1134 void FlushVerticesImpl(
bool KeepVertices,
int &PrimType,
size_t &PrimCount,
size_t &NumVerts, TName &Command,
size_t VertSize)
1136 Command.m_pVertices =
nullptr;
1150 PrimCount = NumVerts / 3;
1155 PrimCount = NumVerts / 4;
1161 PrimCount = NumVerts / 2;
1166 PrimCount = NumVerts / 3;
1174 Command.m_PrimType = PrimType;
1175 Command.m_PrimCount = PrimCount;
1179 return Command.m_pVertices !=
nullptr;
1188 void RenderTileLayer(
int BufferContainerIndex,
const ColorRGBA &Color,
char **pOffsets,
unsigned int *pIndicedVertexDrawNum,
size_t NumIndicesOffset)
override;
1189 virtual void RenderBorderTiles(
int BufferContainerIndex,
const ColorRGBA &Color,
char *pIndexBufferOffset,
const vec2 &Offset,
const vec2 &Scale, uint32_t DrawNum)
override;
1191 void RenderText(
int BufferContainerIndex,
int TextQuadNum,
int TextureSize,
int TextureTextIndex,
int TextureTextOutlineIndex,
const ColorRGBA &TextColor,
const ColorRGBA &TextOutlineColor)
override;
1194 int CreateBufferObject(
size_t UploadDataSize,
void *pUploadData,
int CreateFlags,
bool IsMovedPointer =
false)
override;
1195 void RecreateBufferObject(
int BufferIndex,
size_t UploadDataSize,
void *pUploadData,
int CreateFlags,
bool IsMovedPointer =
false)
override;
1196 void UpdateBufferObjectInternal(
int BufferIndex,
size_t UploadDataSize,
void *pUploadData,
void *pOffset,
bool IsMovedPointer =
false);
1197 void CopyBufferObjectInternal(
int WriteBufferIndex,
int ReadBufferIndex,
size_t WriteOffset,
size_t ReadOffset,
size_t CopyDataSize);
1214 void Move(
int x,
int y)
override;
1215 bool Resize(
int w,
int h,
int RefreshRate)
override;
1217 void GotResized(
int w,
int h,
int RefreshRate)
override;
1218 void UpdateViewport(
int X,
int Y,
int W,
int H,
bool ByResize)
override;
1232 int Init()
override;
1238 void Swap()
override;
1239 bool SetVSync(
bool State)
override;
1240 bool SetMultiSampling(uint32_t ReqMultiSamplingCount, uint32_t &MultiSamplingCountBackend)
override;
1250 bool IsIdle()
const override;
1254 bool ShowMessageBox(
unsigned Type,
const char *pTitle,
const char *pMsg)
override;
1257 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:18
unsigned char * m_pData
Definition: graphics_threaded.h:19
~CBuffer()
Definition: graphics_threaded.h:31
unsigned m_Used
Definition: graphics_threaded.h:21
void Reset()
Definition: graphics_threaded.h:39
unsigned DataSize() const
Definition: graphics_threaded.h:59
CBuffer(unsigned BufferSize)
Definition: graphics_threaded.h:24
void * Alloc(unsigned Requested, unsigned Alignment=alignof(std::max_align_t))
Definition: graphics_threaded.h:44
unsigned DataUsed() const
Definition: graphics_threaded.h:60
unsigned char * DataPtr()
Definition: graphics_threaded.h:58
unsigned m_Size
Definition: graphics_threaded.h:20
Definition: graphics_threaded.h:16
SCommand * Head()
Definition: graphics_threaded.h:635
GL_SVertexTex3D SVertexTex3D
Definition: graphics_threaded.h:181
bool AddCommandUnsafe(const T &Command)
Definition: graphics_threaded.h:612
void * AllocData(unsigned WantedSize)
Definition: graphics_threaded.h:606
vec2 STexCoord
Definition: graphics_threaded.h:177
SCommand * m_pCmdBufferHead
Definition: graphics_threaded.h:192
@ MAX_VERTICES
Definition: graphics_threaded.h:73
@ MAX_TEXTURES
Definition: graphics_threaded.h:72
ECommandBufferCMD
Definition: graphics_threaded.h:77
@ CMD_MULTISAMPLING
Definition: graphics_threaded.h:130
@ CMD_COPY_BUFFER_OBJECT
Definition: graphics_threaded.h:109
@ CMD_RECREATE_BUFFER_OBJECT
Definition: graphics_threaded.h:107
@ CMD_VSYNC
Definition: graphics_threaded.h:131
@ CMD_TEXT_TEXTURES_DESTROY
Definition: graphics_threaded.h:97
@ CMD_RENDER_BORDER_TILE
Definition: graphics_threaded.h:119
@ CMD_RENDER_QUAD_CONTAINER_SPRITE_MULTIPLE
Definition: graphics_threaded.h:124
@ CMD_TEXTURE_DESTROY
Definition: graphics_threaded.h:95
@ CMD_UPDATE_VIEWPORT
Definition: graphics_threaded.h:134
@ CMD_INDICES_REQUIRED_NUM_NOTIFY
Definition: graphics_threaded.h:116
@ CMD_UPDATE_BUFFER_OBJECT
Definition: graphics_threaded.h:108
@ CMD_TEXTURE_CREATE
Definition: graphics_threaded.h:94
@ CMDGROUP_PLATFORM_GL
Definition: graphics_threaded.h:80
@ CMD_RENDER_TEX3D
Definition: graphics_threaded.h:103
@ CMD_SIGNAL
Definition: graphics_threaded.h:91
@ CMD_RUNBUFFER
Definition: graphics_threaded.h:88
@ CMD_RENDER_QUAD_CONTAINER_EX
Definition: graphics_threaded.h:123
@ CMD_WINDOW_CREATE_NTF
Definition: graphics_threaded.h:137
@ CMDGROUP_CORE
Definition: graphics_threaded.h:79
@ CMD_RENDER_QUAD_CONTAINER
Definition: graphics_threaded.h:122
@ CMD_RENDER_TEXT
Definition: graphics_threaded.h:121
@ CMD_RENDER
Definition: graphics_threaded.h:102
@ CMD_UPDATE_BUFFER_CONTAINER
Definition: graphics_threaded.h:114
@ CMD_WINDOW_DESTROY_NTF
Definition: graphics_threaded.h:138
@ CMD_RENDER_TILE_LAYER
Definition: graphics_threaded.h:118
@ CMD_CLEAR
Definition: graphics_threaded.h:101
@ CMD_TEXT_TEXTURE_UPDATE
Definition: graphics_threaded.h:98
@ CMD_TRY_SWAP_AND_READ_PIXEL
Definition: graphics_threaded.h:132
@ CMD_SWAP
Definition: graphics_threaded.h:127
@ CMD_RENDER_QUAD_LAYER
Definition: graphics_threaded.h:120
@ CMDGROUP_PLATFORM_SDL
Definition: graphics_threaded.h:81
@ CMD_COUNT
Definition: graphics_threaded.h:140
@ CMD_NOP
Definition: graphics_threaded.h:85
@ CMD_FIRST
Definition: graphics_threaded.h:84
@ CMD_CREATE_BUFFER_OBJECT
Definition: graphics_threaded.h:106
@ CMD_DELETE_BUFFER_CONTAINER
Definition: graphics_threaded.h:113
@ CMD_DELETE_BUFFER_OBJECT
Definition: graphics_threaded.h:110
@ CMD_TRY_SWAP_AND_SCREENSHOT
Definition: graphics_threaded.h:133
@ CMD_TEXT_TEXTURES_CREATE
Definition: graphics_threaded.h:96
@ CMD_CREATE_BUFFER_CONTAINER
Definition: graphics_threaded.h:112
@ BLEND_NONE
Definition: graphics_threaded.h:165
@ BLEND_ALPHA
Definition: graphics_threaded.h:166
@ BLEND_ADDITIVE
Definition: graphics_threaded.h:167
@ WRAP_REPEAT
Definition: graphics_threaded.h:172
@ WRAP_CLAMP
Definition: graphics_threaded.h:173
size_t m_CommandCount
Definition: graphics_threaded.h:65
GL_SVertex SVertex
Definition: graphics_threaded.h:180
vec2 SPoint
Definition: graphics_threaded.h:176
GL_SColorf SColorf
Definition: graphics_threaded.h:178
SCommand * m_pCmdBufferTail
Definition: graphics_threaded.h:193
GL_SColor SColor
Definition: graphics_threaded.h:179
@ TEXFLAG_NOMIPMAPS
Definition: graphics_threaded.h:148
@ TEXFLAG_NO_2D_TEXTURE
Definition: graphics_threaded.h:151
@ TEXFORMAT_INVALID
Definition: graphics_threaded.h:145
@ TEXFLAG_TO_3D_TEXTURE
Definition: graphics_threaded.h:149
@ TEXFORMAT_RGBA
Definition: graphics_threaded.h:146
@ TEXFLAG_TO_2D_ARRAY_TEXTURE
Definition: graphics_threaded.h:150
void Reset()
Definition: graphics_threaded.h:640
GL_SVertexTex3DStream SVertexTex3DStream
Definition: graphics_threaded.h:182
CCommandBuffer(unsigned CmdBufferSize, unsigned DataBufferSize)
Definition: graphics_threaded.h:601
size_t m_RenderCallCount
Definition: graphics_threaded.h:66
void AddRenderCalls(size_t RenderCallCountToAdd)
Definition: graphics_threaded.h:650
CBuffer m_CmdBuffer
Definition: graphics_threaded.h:64
CBuffer m_DataBuffer
Definition: graphics_threaded.h:68
@ PRIMTYPE_TRIANGLES
Definition: graphics_threaded.h:160
@ PRIMTYPE_QUADS
Definition: graphics_threaded.h:159
@ PRIMTYPE_LINES
Definition: graphics_threaded.h:158
@ PRIMTYPE_INVALID
Definition: graphics_threaded.h:157
Definition: graphics_threaded.h:750
SWarning * GetCurWarning() override
Definition: graphics_threaded.cpp:2793
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:910
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 WindowCreateNtf(uint32_t WindowId) override
Definition: graphics_threaded.cpp:2635
bool IsBackendInitialized() override
Definition: graphics_threaded.cpp:2812
int m_TextureMemoryUsage
Definition: graphics_threaded.h:799
std::vector< WINDOW_PROPS_CHANGED_FUNC > m_vPropChangeListeners
Definition: graphics_threaded.h:853
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:767
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:1257
void QuadsTex3DEnd() override
Definition: graphics_threaded.cpp:742
int CreateQuadContainer(bool AutomaticUpload=true) override
Definition: graphics_threaded.cpp:1440
int WindowActive() override
Definition: graphics_threaded.cpp:2648
void MapScreen(float TopLeftX, float TopLeftY, float BottomRightX, float BottomRightY) override
Definition: graphics_threaded.cpp:216
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:782
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:760
const char * GetVersionString() override
Definition: graphics_threaded.cpp:2822
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 GL_SColor * GetCurColor() override
Definition: graphics_threaded.h:1115
const char * GetRendererString() override
Definition: graphics_threaded.cpp:2827
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:779
void QuadsEnd() override
Definition: graphics_threaded.cpp:730
IGraphicsBackend * m_pBackend
Definition: graphics_threaded.h:761
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:803
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:793
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:786
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:2756
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:1263
int m_FirstFreeVertexArrayInfo
Definition: graphics_threaded.h:819
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:2738
bool Resize(int w, int h, int RefreshRate) override
Definition: graphics_threaded.cpp:2537
void ResizeToScreen() override
Definition: graphics_threaded.cpp:2558
bool m_WarnPngliteIncompatibleImages
Definition: graphics_threaded.h:801
std::vector< WINDOW_RESIZE_FUNC > m_vResizeListeners
Definition: graphics_threaded.h:852
void WaitForIdle() override
Definition: graphics_threaded.cpp:2788
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:775
void Swap() override
Definition: graphics_threaded.cpp:2709
CTextureHandle m_NullTexture
Definition: graphics_threaded.h:795
void Shutdown() override
Definition: graphics_threaded.cpp:2448
size_t m_FirstFreeTexture
Definition: graphics_threaded.h:798
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:2832
bool IsConfigModernAPI() override
Definition: graphics_threaded.h:1258
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:911
int m_Drawing
Definition: graphics_threaded.h:791
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:1261
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:785
class IConsole * m_pConsole
Definition: graphics_threaded.h:776
const GL_STexCoord * GetCurTextureCoordinates() override
Definition: graphics_threaded.h:1110
void FlushVertices(bool KeepVertices=false) override
Definition: graphics_threaded.cpp:62
float m_Rotation
Definition: graphics_threaded.h:790
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
@ DRAWING_LINES
Definition: graphics_threaded.h:756
@ NUM_CMDBUFFERS
Definition: graphics_threaded.h:753
@ DRAWING_TRIANGLES
Definition: graphics_threaded.h:757
@ DRAWING_QUADS
Definition: graphics_threaded.h:755
bool m_GLUses2DTextureArrays
Definition: graphics_threaded.h:766
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:822
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:783
bool m_RenderEnable
Definition: graphics_threaded.h:788
bool IsQuadBufferingEnabled() override
Definition: graphics_threaded.h:1260
void WrapClamp() override
Definition: graphics_threaded.cpp:186
CCommandBuffer * m_pCommandBuffer
Definition: graphics_threaded.h:771
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:2837
std::vector< int > m_vTextureIndices
Definition: graphics_threaded.h:797
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:763
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:762
bool m_DoScreenshot
Definition: graphics_threaded.h:792
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:772
void * AllocCommandBufferData(size_t AllocSize)
Definition: graphics_threaded.cpp:1886
CCommandBuffer * m_apCommandBuffers[NUM_CMDBUFFERS]
Definition: graphics_threaded.h:770
const char * GetVendorString() override
Definition: graphics_threaded.cpp:2817
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:821
bool m_GLQuadContainerBufferingEnabled
Definition: graphics_threaded.h:765
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:1264
bool IsIdle() const override
Definition: graphics_threaded.cpp:2783
bool IsTileBufferingEnabled() override
Definition: graphics_threaded.h:1259
void GetCurrentVideoMode(CVideoMode &CurMode, int Screen) override
Definition: graphics_threaded.cpp:2851
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:764
bool ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg) override
Definition: graphics_threaded.cpp:2804
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:1134
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:880
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:781
int m_FirstFreeQuadContainer
Definition: graphics_threaded.h:850
int QuadContainerAddQuads(int ContainerIndex, CQuadItem *pArray, int Num) override
Definition: graphics_threaded.cpp:1516
std::vector< SQuadContainer > m_vQuadContainers
Definition: graphics_threaded.h:849
void QuadsDrawTLImpl(TName *pVertices, const CQuadItem *pArray, int Num)
Definition: graphics_threaded.h:1006
void AddWindowPropChangeListener(WINDOW_PROPS_CHANGED_FUNC pFunc) override
Definition: graphics_threaded.cpp:2612
bool m_GLUseTrianglesAsQuad
Definition: graphics_threaded.h:768
class IEngine * m_pEngine
Definition: graphics_threaded.h:777
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:1246
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:983
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:807
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:818
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:862
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
bool IsQuadContainerBufferingEnabled() override
Definition: graphics_threaded.h:1262
virtual int GetDesktopScreenWidth() const
Definition: graphics_threaded.h:1245
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:2776
Definition: threading.h:8
Definition: graphics.h:72
Definition: graphics.h:501
Definition: graphics_threaded.h:672
virtual int WindowActive()=0
virtual bool HasTextureArraysSupport()
Definition: graphics_threaded.h:733
virtual bool HasTileBuffering()
Definition: graphics_threaded.h:728
virtual const char * GetErrorString()
Definition: graphics_threaded.h:734
@ INITFLAG_BORDERLESS
Definition: graphics_threaded.h:679
@ INITFLAG_FULLSCREEN
Definition: graphics_threaded.h:676
@ INITFLAG_DESKTOP_FULLSCREEN
Definition: graphics_threaded.h:681
@ INITFLAG_VSYNC
Definition: graphics_threaded.h:677
@ INITFLAG_RESIZABLE
Definition: graphics_threaded.h:678
@ INITFLAG_HIGHDPI
Definition: graphics_threaded.h:680
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:726
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:727
virtual bool HasQuadContainerBuffering()
Definition: graphics_threaded.h:731
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
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:732
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:730
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:729
Definition: graphics.h:200
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:142
EGraphicsDriverAgeType
Definition: graphics.h:133
std::function< bool(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector< uint8_t > &vDstData)> TGLBackendReadPresentedImageData
Definition: graphics.h:180
std::function< void()> WINDOW_RESIZE_FUNC
Definition: graphics.h:177
std::function< void()> WINDOW_PROPS_CHANGED_FUNC
Definition: graphics.h:178
std::function< const char *(const char *, const char *)> TTranslateFunc
Definition: graphics_threaded.h:1273
constexpr int CMD_BUFFER_DATA_BUFFER_SIZE
Definition: graphics_threaded.h:12
IGraphicsBackend * CreateGraphicsBackend(TTranslateFunc &&TranslateFunc)
Definition: backend_sdl.cpp:1647
constexpr int CMD_BUFFER_CMD_BUFFER_SIZE
Definition: graphics_threaded.h:13
EGraphicsBackendErrorCodes
Definition: graphics_threaded.h:657
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_INFO_REQUEST_FAILED
Definition: graphics_threaded.h:664
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_INIT_FAILED
Definition: graphics_threaded.h:662
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_RESOLUTION_REQUEST_FAILED
Definition: graphics_threaded.h:665
@ GRAPHICS_BACKEND_ERROR_CODE_NONE
Definition: graphics_threaded.h:659
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_WINDOW_CREATE_FAILED
Definition: graphics_threaded.h:666
@ GRAPHICS_BACKEND_ERROR_CODE_SDL_SCREEN_REQUEST_FAILED
Definition: graphics_threaded.h:663
@ GRAPHICS_BACKEND_ERROR_CODE_GL_VERSION_FAILED
Definition: graphics_threaded.h:661
@ GRAPHICS_BACKEND_ERROR_CODE_GL_CONTEXT_FAILED
Definition: graphics_threaded.h:660
@ GRAPHICS_BACKEND_ERROR_CODE_UNKNOWN
Definition: graphics_threaded.h:658
#define dbg_assert(test, msg)
Definition: system.h:76
Definition: graphics_threaded.h:212
SColorf m_Color
Definition: graphics_threaded.h:215
SCommand_Clear()
Definition: graphics_threaded.h:213
bool m_ForceClear
Definition: graphics_threaded.h:216
Definition: graphics_threaded.h:295
SCommand_CopyBufferObject()
Definition: graphics_threaded.h:296
size_t m_WriteOffset
Definition: graphics_threaded.h:303
int m_WriteBufferIndex
Definition: graphics_threaded.h:299
int m_ReadBufferIndex
Definition: graphics_threaded.h:300
size_t m_ReadOffset
Definition: graphics_threaded.h:302
size_t m_CopySize
Definition: graphics_threaded.h:304
Definition: graphics_threaded.h:316
SCommand_CreateBufferContainer()
Definition: graphics_threaded.h:317
int m_Stride
Definition: graphics_threaded.h:322
int m_VertBufferBindingIndex
Definition: graphics_threaded.h:323
int m_BufferContainerIndex
Definition: graphics_threaded.h:320
size_t m_AttrCount
Definition: graphics_threaded.h:325
SBufferContainerInfo::SAttribute * m_pAttributes
Definition: graphics_threaded.h:326
Definition: graphics_threaded.h:254
size_t m_DataSize
Definition: graphics_threaded.h:262
void * m_pUploadData
Definition: graphics_threaded.h:261
int m_BufferIndex
Definition: graphics_threaded.h:258
bool m_DeletePointer
Definition: graphics_threaded.h:260
SCommand_CreateBufferObject()
Definition: graphics_threaded.h:255
int m_Flags
Definition: graphics_threaded.h:264
Definition: graphics_threaded.h:344
int m_BufferContainerIndex
Definition: graphics_threaded.h:348
bool m_DestroyAllBO
Definition: graphics_threaded.h:349
SCommand_DeleteBufferContainer()
Definition: graphics_threaded.h:345
Definition: graphics_threaded.h:308
SCommand_DeleteBufferObject()
Definition: graphics_threaded.h:309
int m_BufferIndex
Definition: graphics_threaded.h:312
Definition: graphics_threaded.h:353
SCommand_IndicesRequiredNumNotify()
Definition: graphics_threaded.h:354
unsigned int m_RequiredIndicesNum
Definition: graphics_threaded.h:357
Definition: graphics_threaded.h:498
SCommand_MultiSampling()
Definition: graphics_threaded.h:499
bool * m_pRetOk
Definition: graphics_threaded.h:504
uint32_t * m_pRetMultiSamplingCount
Definition: graphics_threaded.h:503
uint32_t m_RequestedMultiSamplingCount
Definition: graphics_threaded.h:502
Definition: graphics_threaded.h:268
void * m_pUploadData
Definition: graphics_threaded.h:275
int m_BufferIndex
Definition: graphics_threaded.h:272
int m_Flags
Definition: graphics_threaded.h:278
size_t m_DataSize
Definition: graphics_threaded.h:276
bool m_DeletePointer
Definition: graphics_threaded.h:274
SCommand_RecreateBufferObject()
Definition: graphics_threaded.h:269
Definition: graphics_threaded.h:376
SState m_State
Definition: graphics_threaded.h:379
uint32_t m_DrawNum
Definition: graphics_threaded.h:382
char * m_pIndicesOffset
Definition: graphics_threaded.h:381
vec2 m_Offset
Definition: graphics_threaded.h:385
SColorf m_Color
Definition: graphics_threaded.h:380
SCommand_RenderBorderTile()
Definition: graphics_threaded.h:377
int m_BufferContainerIndex
Definition: graphics_threaded.h:383
vec2 m_Scale
Definition: graphics_threaded.h:386
Definition: graphics_threaded.h:448
SCommand_RenderQuadContainerAsSpriteMultiple()
Definition: graphics_threaded.h:449
SPoint m_Center
Definition: graphics_threaded.h:457
int m_BufferContainerIndex
Definition: graphics_threaded.h:453
unsigned int m_DrawNum
Definition: graphics_threaded.h:460
unsigned int m_DrawCount
Definition: graphics_threaded.h:461
SState m_State
Definition: graphics_threaded.h:451
void * m_pOffset
Definition: graphics_threaded.h:462
IGraphics::SRenderSpriteInfo * m_pRenderInfo
Definition: graphics_threaded.h:455
SColorf m_VertexColor
Definition: graphics_threaded.h:458
Definition: graphics_threaded.h:431
int m_BufferContainerIndex
Definition: graphics_threaded.h:436
void * m_pOffset
Definition: graphics_threaded.h:444
SPoint m_Center
Definition: graphics_threaded.h:439
SState m_State
Definition: graphics_threaded.h:434
float m_Rotation
Definition: graphics_threaded.h:438
SCommand_RenderQuadContainerEx()
Definition: graphics_threaded.h:432
unsigned int m_DrawNum
Definition: graphics_threaded.h:443
SColorf m_VertexColor
Definition: graphics_threaded.h:441
Definition: graphics_threaded.h:419
unsigned int m_DrawNum
Definition: graphics_threaded.h:426
SCommand_RenderQuadContainer()
Definition: graphics_threaded.h:420
void * m_pOffset
Definition: graphics_threaded.h:427
int m_BufferContainerIndex
Definition: graphics_threaded.h:424
SState m_State
Definition: graphics_threaded.h:422
Definition: graphics_threaded.h:390
int m_QuadOffset
Definition: graphics_threaded.h:398
SCommand_RenderQuadLayer()
Definition: graphics_threaded.h:391
SState m_State
Definition: graphics_threaded.h:393
int m_BufferContainerIndex
Definition: graphics_threaded.h:395
SQuadRenderInfo * m_pQuadInfo
Definition: graphics_threaded.h:396
size_t m_QuadNum
Definition: graphics_threaded.h:397
Definition: graphics_threaded.h:244
unsigned m_PrimCount
Definition: graphics_threaded.h:249
SVertexTex3DStream * m_pVertices
Definition: graphics_threaded.h:250
SCommand_RenderTex3D()
Definition: graphics_threaded.h:245
unsigned m_PrimType
Definition: graphics_threaded.h:248
SState m_State
Definition: graphics_threaded.h:247
Definition: graphics_threaded.h:402
ColorRGBA m_TextOutlineColor
Definition: graphics_threaded.h:415
ColorRGBA m_TextColor
Definition: graphics_threaded.h:414
SCommand_RenderText()
Definition: graphics_threaded.h:403
int m_TextureSize
Definition: graphics_threaded.h:408
int m_DrawNum
Definition: graphics_threaded.h:413
int m_TextOutlineTextureIndex
Definition: graphics_threaded.h:411
int m_TextTextureIndex
Definition: graphics_threaded.h:410
SState m_State
Definition: graphics_threaded.h:405
int m_BufferContainerIndex
Definition: graphics_threaded.h:407
Definition: graphics_threaded.h:361
int m_BufferContainerIndex
Definition: graphics_threaded.h:372
SColorf m_Color
Definition: graphics_threaded.h:365
char ** m_pIndicesOffsets
Definition: graphics_threaded.h:368
int m_IndicesDrawNum
Definition: graphics_threaded.h:371
SState m_State
Definition: graphics_threaded.h:364
SCommand_RenderTileLayer()
Definition: graphics_threaded.h:362
unsigned int * m_pDrawCount
Definition: graphics_threaded.h:369
Definition: graphics_threaded.h:234
SVertex * m_pVertices
Definition: graphics_threaded.h:240
SState m_State
Definition: graphics_threaded.h:237
unsigned m_PrimCount
Definition: graphics_threaded.h:239
SCommand_Render()
Definition: graphics_threaded.h:235
unsigned m_PrimType
Definition: graphics_threaded.h:238
Definition: graphics_threaded.h:227
CCommandBuffer * m_pOtherBuffer
Definition: graphics_threaded.h:230
SCommand_RunBuffer()
Definition: graphics_threaded.h:228
Definition: graphics_threaded.h:220
SCommand_Signal()
Definition: graphics_threaded.h:221
CSemaphore * m_pSemaphore
Definition: graphics_threaded.h:223
Definition: graphics_threaded.h:483
SCommand_Swap()
Definition: graphics_threaded.h:484
Definition: graphics_threaded.h:570
uint8_t * m_pData
Definition: graphics_threaded.h:581
SCommand_TextTexture_Update()
Definition: graphics_threaded.h:571
size_t m_Width
Definition: graphics_threaded.h:579
int m_Slot
Definition: graphics_threaded.h:575
int m_X
Definition: graphics_threaded.h:577
int m_Y
Definition: graphics_threaded.h:578
size_t m_Height
Definition: graphics_threaded.h:580
Definition: graphics_threaded.h:544
SCommand_TextTextures_Create()
Definition: graphics_threaded.h:545
int m_SlotOutline
Definition: graphics_threaded.h:550
size_t m_Width
Definition: graphics_threaded.h:552
uint8_t * m_pTextData
Definition: graphics_threaded.h:555
uint8_t * m_pTextOutlineData
Definition: graphics_threaded.h:556
size_t m_Height
Definition: graphics_threaded.h:553
int m_Slot
Definition: graphics_threaded.h:549
Definition: graphics_threaded.h:560
int m_Slot
Definition: graphics_threaded.h:565
int m_SlotOutline
Definition: graphics_threaded.h:566
SCommand_TextTextures_Destroy()
Definition: graphics_threaded.h:561
Definition: graphics_threaded.h:520
SCommand_Texture_Create()
Definition: graphics_threaded.h:521
size_t m_Height
Definition: graphics_threaded.h:528
uint8_t * m_pData
Definition: graphics_threaded.h:531
size_t m_Width
Definition: graphics_threaded.h:527
int m_Flags
Definition: graphics_threaded.h:529
int m_Slot
Definition: graphics_threaded.h:525
Definition: graphics_threaded.h:535
SCommand_Texture_Destroy()
Definition: graphics_threaded.h:536
int m_Slot
Definition: graphics_threaded.h:540
Definition: graphics_threaded.h:466
ivec2 m_Position
Definition: graphics_threaded.h:469
bool * m_pSwapped
Definition: graphics_threaded.h:471
SColorf * m_pColor
Definition: graphics_threaded.h:470
SCommand_TrySwapAndReadPixel()
Definition: graphics_threaded.h:467
Definition: graphics_threaded.h:475
CImageInfo * m_pImage
Definition: graphics_threaded.h:478
SCommand_TrySwapAndScreenshot()
Definition: graphics_threaded.h:476
bool * m_pSwapped
Definition: graphics_threaded.h:479
Definition: graphics_threaded.h:330
SBufferContainerInfo::SAttribute * m_pAttributes
Definition: graphics_threaded.h:340
int m_VertBufferBindingIndex
Definition: graphics_threaded.h:337
int m_BufferContainerIndex
Definition: graphics_threaded.h:334
SCommand_UpdateBufferContainer()
Definition: graphics_threaded.h:331
int m_Stride
Definition: graphics_threaded.h:336
size_t m_AttrCount
Definition: graphics_threaded.h:339
Definition: graphics_threaded.h:282
SCommand_UpdateBufferObject()
Definition: graphics_threaded.h:283
size_t m_DataSize
Definition: graphics_threaded.h:291
void * m_pUploadData
Definition: graphics_threaded.h:290
int m_BufferIndex
Definition: graphics_threaded.h:286
bool m_DeletePointer
Definition: graphics_threaded.h:288
void * m_pOffset
Definition: graphics_threaded.h:289
Definition: graphics_threaded.h:508
SCommand_Update_Viewport()
Definition: graphics_threaded.h:509
int m_Height
Definition: graphics_threaded.h:515
int m_X
Definition: graphics_threaded.h:512
bool m_ByResize
Definition: graphics_threaded.h:516
int m_Width
Definition: graphics_threaded.h:514
int m_Y
Definition: graphics_threaded.h:513
Definition: graphics_threaded.h:489
int m_VSync
Definition: graphics_threaded.h:493
SCommand_VSync()
Definition: graphics_threaded.h:490
bool * m_pRetOk
Definition: graphics_threaded.h:494
Definition: graphics_threaded.h:585
uint32_t m_WindowId
Definition: graphics_threaded.h:589
SCommand_WindowCreateNtf()
Definition: graphics_threaded.h:586
Definition: graphics_threaded.h:593
SCommand_WindowDestroyNtf()
Definition: graphics_threaded.h:594
uint32_t m_WindowId
Definition: graphics_threaded.h:597
Definition: graphics_threaded.h:185
SCommand(unsigned Cmd)
Definition: graphics_threaded.h:187
SCommand * m_pNext
Definition: graphics_threaded.h:190
unsigned m_Cmd
Definition: graphics_threaded.h:189
Definition: graphics_threaded.h:196
bool m_ClipEnable
Definition: graphics_threaded.h:204
int m_Texture
Definition: graphics_threaded.h:199
int m_WrapMode
Definition: graphics_threaded.h:198
int m_ClipW
Definition: graphics_threaded.h:207
SPoint m_ScreenTL
Definition: graphics_threaded.h:200
int m_BlendMode
Definition: graphics_threaded.h:197
SPoint m_ScreenBR
Definition: graphics_threaded.h:201
int m_ClipY
Definition: graphics_threaded.h:206
int m_ClipH
Definition: graphics_threaded.h:208
int m_ClipX
Definition: graphics_threaded.h:205
Definition: client_data.h:29
Definition: graphics_threaded.h:836
CCommandBuffer::SVertex m_aVertices[4]
Definition: graphics_threaded.h:837
Definition: graphics_threaded.h:825
int m_FreeIndex
Definition: graphics_threaded.h:845
int m_QuadBufferObjectIndex
Definition: graphics_threaded.h:842
std::vector< SQuad > m_vQuads
Definition: graphics_threaded.h:840
int m_QuadBufferContainerIndex
Definition: graphics_threaded.h:843
bool m_AutomaticUpload
Definition: graphics_threaded.h:847
SQuadContainer(bool AutomaticUpload=true)
Definition: graphics_threaded.h:826
Definition: graphics_threaded.h:810
SVertexArrayInfo()
Definition: graphics_threaded.h:811
int m_AssociatedBufferObjectIndex
Definition: graphics_threaded.h:814
int m_FreeIndex
Definition: graphics_threaded.h:816
Definition: graphics.h:123
Definition: graphics.h:116
Definition: graphics.h:109
Definition: graphics.h:336
Definition: graphics.h:367
float m_Y
Definition: graphics.h:368
float m_Height
Definition: graphics.h:368
float m_X
Definition: graphics.h:368
float m_Width
Definition: graphics.h:368
Definition: graphics.h:406
Definition: graphics.h:31
Definition: graphics.h:25
Definition: graphics.h:44
Definition: graphics.h:154
#define str_format
Definition: system.cpp:2789
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
vector2_base< int > ivec2
Definition: vmath.h:160