DDraceNetwork Docs
CCommandBuffer Class Reference

#include <graphics_threaded.h>

Collaboration diagram for CCommandBuffer:
[legend]

Classes

class  CBuffer
 
struct  SCommand
 
struct  SCommand_Clear
 
struct  SCommand_CopyBufferObject
 
struct  SCommand_CreateBufferContainer
 
struct  SCommand_CreateBufferObject
 
struct  SCommand_DeleteBufferContainer
 
struct  SCommand_DeleteBufferObject
 
struct  SCommand_IndicesRequiredNumNotify
 
struct  SCommand_MultiSampling
 
struct  SCommand_RecreateBufferObject
 
struct  SCommand_Render
 
struct  SCommand_RenderBorderTile
 
struct  SCommand_RenderQuadContainer
 
struct  SCommand_RenderQuadContainerAsSpriteMultiple
 
struct  SCommand_RenderQuadContainerEx
 
struct  SCommand_RenderQuadLayer
 
struct  SCommand_RenderTex3D
 
struct  SCommand_RenderText
 
struct  SCommand_RenderTileLayer
 
struct  SCommand_RunBuffer
 
struct  SCommand_Signal
 
struct  SCommand_Swap
 
struct  SCommand_TextTexture_Update
 
struct  SCommand_TextTextures_Create
 
struct  SCommand_TextTextures_Destroy
 
struct  SCommand_Texture_Create
 
struct  SCommand_Texture_Destroy
 
struct  SCommand_TrySwapAndReadPixel
 
struct  SCommand_TrySwapAndScreenshot
 
struct  SCommand_Update_Viewport
 
struct  SCommand_UpdateBufferContainer
 
struct  SCommand_UpdateBufferObject
 
struct  SCommand_VSync
 
struct  SCommand_WindowCreateNtf
 
struct  SCommand_WindowDestroyNtf
 
struct  SState
 

Public Types

enum  { MAX_TEXTURES = 1024 * 8 , MAX_VERTICES = 32 * 1024 }
 
enum  ECommandBufferCMD {
  CMDGROUP_CORE = 0 , CMDGROUP_PLATFORM_GL = 10000 , CMDGROUP_PLATFORM_SDL = 20000 , CMD_FIRST = CMDGROUP_CORE ,
  CMD_NOP = CMD_FIRST , CMD_RUNBUFFER , CMD_SIGNAL , CMD_TEXTURE_CREATE ,
  CMD_TEXTURE_DESTROY , CMD_TEXT_TEXTURES_CREATE , CMD_TEXT_TEXTURES_DESTROY , CMD_TEXT_TEXTURE_UPDATE ,
  CMD_CLEAR , CMD_RENDER , CMD_RENDER_TEX3D , CMD_CREATE_BUFFER_OBJECT ,
  CMD_RECREATE_BUFFER_OBJECT , CMD_UPDATE_BUFFER_OBJECT , CMD_COPY_BUFFER_OBJECT , CMD_DELETE_BUFFER_OBJECT ,
  CMD_CREATE_BUFFER_CONTAINER , CMD_DELETE_BUFFER_CONTAINER , CMD_UPDATE_BUFFER_CONTAINER , CMD_INDICES_REQUIRED_NUM_NOTIFY ,
  CMD_RENDER_TILE_LAYER , CMD_RENDER_BORDER_TILE , CMD_RENDER_QUAD_LAYER , CMD_RENDER_TEXT ,
  CMD_RENDER_QUAD_CONTAINER , CMD_RENDER_QUAD_CONTAINER_EX , CMD_RENDER_QUAD_CONTAINER_SPRITE_MULTIPLE , CMD_SWAP ,
  CMD_MULTISAMPLING , CMD_VSYNC , CMD_TRY_SWAP_AND_READ_PIXEL , CMD_TRY_SWAP_AND_SCREENSHOT ,
  CMD_UPDATE_VIEWPORT , CMD_WINDOW_CREATE_NTF , CMD_WINDOW_DESTROY_NTF , CMD_COUNT
}
 
enum  {
  TEXFORMAT_INVALID = 0 , TEXFORMAT_RGBA , TEXFLAG_NOMIPMAPS = 1 , TEXFLAG_TO_3D_TEXTURE = (1 << 3) ,
  TEXFLAG_TO_2D_ARRAY_TEXTURE = (1 << 4) , TEXFLAG_NO_2D_TEXTURE = (1 << 5)
}
 
enum  { PRIMTYPE_INVALID = 0 , PRIMTYPE_LINES , PRIMTYPE_QUADS , PRIMTYPE_TRIANGLES }
 
enum  { BLEND_NONE = 0 , BLEND_ALPHA , BLEND_ADDITIVE }
 
enum  { WRAP_REPEAT = 0 , WRAP_CLAMP }
 
typedef vec2 SPoint
 
typedef vec2 STexCoord
 
typedef GL_SColorf SColorf
 
typedef GL_SColor SColor
 
typedef GL_SVertex SVertex
 
typedef GL_SVertexTex3D SVertexTex3D
 
typedef GL_SVertexTex3DStream SVertexTex3DStream
 

Public Member Functions

 CCommandBuffer (unsigned CmdBufferSize, unsigned DataBufferSize)
 
void * AllocData (unsigned WantedSize)
 
template<class T >
bool AddCommandUnsafe (const T &Command)
 
SCommandHead ()
 
void Reset ()
 
void AddRenderCalls (size_t RenderCallCountToAdd)
 

Public Attributes

CBuffer m_CmdBuffer
 
size_t m_CommandCount = 0
 
size_t m_RenderCallCount = 0
 
CBuffer m_DataBuffer
 
SCommandm_pCmdBufferHead
 
SCommandm_pCmdBufferTail
 

Member Typedef Documentation

◆ SColor

◆ SColorf

◆ SPoint

◆ STexCoord

◆ SVertex

◆ SVertexTex3D

◆ SVertexTex3DStream

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_TEXTURES 
MAX_VERTICES 

◆ anonymous enum

anonymous enum
Enumerator
TEXFORMAT_INVALID 
TEXFORMAT_RGBA 
TEXFLAG_NOMIPMAPS 
TEXFLAG_TO_3D_TEXTURE 
TEXFLAG_TO_2D_ARRAY_TEXTURE 
TEXFLAG_NO_2D_TEXTURE 

◆ anonymous enum

anonymous enum
Enumerator
PRIMTYPE_INVALID 
PRIMTYPE_LINES 
PRIMTYPE_QUADS 
PRIMTYPE_TRIANGLES 

◆ anonymous enum

anonymous enum
Enumerator
BLEND_NONE 
BLEND_ALPHA 
BLEND_ADDITIVE 

◆ anonymous enum

anonymous enum
Enumerator
WRAP_REPEAT 
WRAP_CLAMP 

◆ ECommandBufferCMD

Enumerator
CMDGROUP_CORE 
CMDGROUP_PLATFORM_GL 
CMDGROUP_PLATFORM_SDL 
CMD_FIRST 
CMD_NOP 
CMD_RUNBUFFER 
CMD_SIGNAL 
CMD_TEXTURE_CREATE 
CMD_TEXTURE_DESTROY 
CMD_TEXT_TEXTURES_CREATE 
CMD_TEXT_TEXTURES_DESTROY 
CMD_TEXT_TEXTURE_UPDATE 
CMD_CLEAR 
CMD_RENDER 
CMD_RENDER_TEX3D 
CMD_CREATE_BUFFER_OBJECT 
CMD_RECREATE_BUFFER_OBJECT 
CMD_UPDATE_BUFFER_OBJECT 
CMD_COPY_BUFFER_OBJECT 
CMD_DELETE_BUFFER_OBJECT 
CMD_CREATE_BUFFER_CONTAINER 
CMD_DELETE_BUFFER_CONTAINER 
CMD_UPDATE_BUFFER_CONTAINER 
CMD_INDICES_REQUIRED_NUM_NOTIFY 
CMD_RENDER_TILE_LAYER 
CMD_RENDER_BORDER_TILE 
CMD_RENDER_QUAD_LAYER 
CMD_RENDER_TEXT 
CMD_RENDER_QUAD_CONTAINER 
CMD_RENDER_QUAD_CONTAINER_EX 
CMD_RENDER_QUAD_CONTAINER_SPRITE_MULTIPLE 
CMD_SWAP 
CMD_MULTISAMPLING 
CMD_VSYNC 
CMD_TRY_SWAP_AND_READ_PIXEL 
CMD_TRY_SWAP_AND_SCREENSHOT 
CMD_UPDATE_VIEWPORT 
CMD_WINDOW_CREATE_NTF 
CMD_WINDOW_DESTROY_NTF 
CMD_COUNT 

Constructor & Destructor Documentation

◆ CCommandBuffer()

CCommandBuffer::CCommandBuffer ( unsigned  CmdBufferSize,
unsigned  DataBufferSize 
)
inline

Member Function Documentation

◆ AddCommandUnsafe()

template<class T >
bool CCommandBuffer::AddCommandUnsafe ( const T &  Command)
inline

◆ AddRenderCalls()

void CCommandBuffer::AddRenderCalls ( size_t  RenderCallCountToAdd)
inline

◆ AllocData()

void * CCommandBuffer::AllocData ( unsigned  WantedSize)
inline

◆ Head()

SCommand * CCommandBuffer::Head ( )
inline

◆ Reset()

void CCommandBuffer::Reset ( )
inline

Member Data Documentation

◆ m_CmdBuffer

CBuffer CCommandBuffer::m_CmdBuffer

◆ m_CommandCount

size_t CCommandBuffer::m_CommandCount = 0

◆ m_DataBuffer

CBuffer CCommandBuffer::m_DataBuffer

◆ m_pCmdBufferHead

SCommand* CCommandBuffer::m_pCmdBufferHead

◆ m_pCmdBufferTail

SCommand* CCommandBuffer::m_pCmdBufferTail

◆ m_RenderCallCount

size_t CCommandBuffer::m_RenderCallCount = 0

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