1#ifndef ENGINE_CLIENT_BACKEND_BACKEND_BASE_H
2#define ENGINE_CLIENT_BACKEND_BACKEND_BASE_H
87 static bool Texture2DTo3D(uint8_t *pImageBuffer,
int ImageWidth,
int ImageHeight,
size_t PixelSize,
int SplitCountWidth,
int SplitCountHeight, uint8_t *pTarget3DImageData,
int &Target3DImageWidth,
int &Target3DImageHeight);
95 virtual void StartCommands(
size_t CommandCount,
size_t EstimatedRenderCallCount) {}
EGfxErrorType
Definition: backend_base.h:36
@ GFX_ERROR_TYPE_RENDER_SUBMIT_FAILED
Definition: backend_base.h:44
@ GFX_ERROR_TYPE_RENDER_CMD_FAILED
Definition: backend_base.h:43
@ GFX_ERROR_TYPE_INIT
Definition: backend_base.h:38
@ GFX_ERROR_TYPE_OUT_OF_MEMORY_BUFFER
Definition: backend_base.h:40
@ GFX_ERROR_TYPE_OUT_OF_MEMORY_IMAGE
Definition: backend_base.h:39
@ GFX_ERROR_TYPE_OUT_OF_MEMORY_STAGING
Definition: backend_base.h:41
@ GFX_ERROR_TYPE_RENDER_RECORDING
Definition: backend_base.h:42
@ GFX_ERROR_TYPE_NONE
Definition: backend_base.h:37
@ GFX_ERROR_TYPE_UNKNOWN
Definition: backend_base.h:46
@ GFX_ERROR_TYPE_SWAP_FAILED
Definition: backend_base.h:45
ERunCommandReturnTypes
Definition: backend_base.h:28
@ RUN_COMMAND_COMMAND_UNHANDLED
Definition: backend_base.h:30
@ RUN_COMMAND_COMMAND_WARNING
Definition: backend_base.h:31
@ RUN_COMMAND_COMMAND_HANDLED
Definition: backend_base.h:29
@ RUN_COMMAND_COMMAND_ERROR
Definition: backend_base.h:32
EDebugGfxModes
Definition: backend_base.h:19
@ DEBUG_GFX_MODE_VERBOSE
Definition: backend_base.h:23
@ DEBUG_GFX_MODE_NONE
Definition: backend_base.h:20
@ DEBUG_GFX_MODE_ALL
Definition: backend_base.h:24
@ DEBUG_GFX_MODE_AFFECTS_PERFORMANCE
Definition: backend_base.h:22
@ DEBUG_GFX_MODE_MINIMUM
Definition: backend_base.h:21
EGfxWarningType
Definition: backend_base.h:50
@ GFX_WARNING_LOW_ON_MEMORY
Definition: backend_base.h:54
@ GFX_WARNING_MISSING_EXTENSION
Definition: backend_base.h:55
@ GFX_WARNING_TYPE_NONE
Definition: backend_base.h:51
@ GFX_WARNING_TYPE_INIT_FAILED_MISSING_INTEGRATED_GPU_DRIVER
Definition: backend_base.h:53
@ GFX_WARNING_TYPE_INIT_FAILED
Definition: backend_base.h:52
@ GFX_WARNING_TYPE_UNKNOWN
Definition: backend_base.h:56
@ CMDGROUP_PLATFORM_GL
Definition: graphics_threaded.h:80
Definition: backend_base.h:82
virtual ERunCommandReturnTypes RunCommand(const CCommandBuffer::SCommand *pBaseCommand)=0
const SGfxErrorContainer & GetError()
Definition: backend_base.h:98
virtual ~CCommandProcessorFragment_GLBase()=default
virtual void StartCommands(size_t CommandCount, size_t EstimatedRenderCallCount)
Definition: backend_base.h:95
static bool Texture2DTo3D(uint8_t *pImageBuffer, int ImageWidth, int ImageHeight, size_t PixelSize, int SplitCountWidth, int SplitCountHeight, uint8_t *pTarget3DImageData, int &Target3DImageWidth, int &Target3DImageHeight)
Definition: backend_base.cpp:4
@ CMD_POST_SHUTDOWN
Definition: backend_base.h:108
@ CMD_SHUTDOWN
Definition: backend_base.h:107
@ CMD_INIT
Definition: backend_base.h:106
@ CMD_PRE_INIT
Definition: backend_base.h:105
SGfxErrorContainer m_Error
Definition: backend_base.h:84
virtual bool GetPresentedImageData(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector< uint8_t > &vDstData)=0
virtual void ErroneousCleanup()
Definition: backend_base.h:99
SGfxWarningContainer m_Warning
Definition: backend_base.h:85
virtual void EndCommands()
Definition: backend_base.h:96
const SGfxWarningContainer & GetWarning()
Definition: backend_base.h:101
EImageFormat
Definition: image.h:18
EBackendType
Definition: graphics.h:142
std::function< bool(uint32_t &Width, uint32_t &Height, CImageInfo::EImageFormat &Format, std::vector< uint8_t > &vDstData)> TGLBackendReadPresentedImageData
Definition: graphics.h:180
Definition: graphics_threaded.h:185
SCommand(unsigned Cmd)
Definition: graphics_threaded.h:187
Definition: backend_base.h:128
int m_GlewMinor
Definition: backend_base.h:162
int m_RequestedMinor
Definition: backend_base.h:156
std::atomic< uint64_t > * m_pBufferMemoryUsage
Definition: backend_base.h:138
char * m_pVendorString
Definition: backend_base.h:151
std::atomic< uint64_t > * m_pStagingMemoryUsage
Definition: backend_base.h:140
EBackendType m_RequestedBackend
Definition: backend_base.h:159
int m_RequestedMajor
Definition: backend_base.h:155
TTwGraphicsGpuList * m_pGpuList
Definition: backend_base.h:142
class IStorage * m_pStorage
Definition: backend_base.h:136
std::atomic< uint64_t > * m_pTextureMemoryUsage
Definition: backend_base.h:137
SCommand_Init()
Definition: backend_base.h:129
char * m_pVersionString
Definition: backend_base.h:152
std::atomic< uint64_t > * m_pStreamMemoryUsage
Definition: backend_base.h:139
uint32_t m_Width
Definition: backend_base.h:133
SDL_Window * m_pWindow
Definition: backend_base.h:132
TGLBackendReadPresentedImageData * m_pReadPresentedImageDataFunc
Definition: backend_base.h:144
char * m_pRendererString
Definition: backend_base.h:153
SBackendCapabilites * m_pCapabilities
Definition: backend_base.h:146
int m_GlewMajor
Definition: backend_base.h:161
int * m_pInitError
Definition: backend_base.h:147
const char ** m_pErrStringPtr
Definition: backend_base.h:149
int m_RequestedPatch
Definition: backend_base.h:157
uint32_t m_Height
Definition: backend_base.h:134
int m_GlewPatch
Definition: backend_base.h:163
Definition: backend_base.h:173
SCommand_PostShutdown()
Definition: backend_base.h:174
Definition: backend_base.h:112
SDL_Window * m_pWindow
Definition: backend_base.h:116
SCommand_PreInit()
Definition: backend_base.h:113
char * m_pVersionString
Definition: backend_base.h:121
char * m_pVendorString
Definition: backend_base.h:120
uint32_t m_Width
Definition: backend_base.h:117
char * m_pRendererString
Definition: backend_base.h:122
TTwGraphicsGpuList * m_pGpuList
Definition: backend_base.h:124
uint32_t m_Height
Definition: backend_base.h:118
Definition: backend_base.h:167
SCommand_Shutdown()
Definition: backend_base.h:168
Definition: backend_sdl.h:112
Definition: backend_base.h:62
std::string m_Err
Definition: backend_base.h:64
bool m_RequiresTranslation
Definition: backend_base.h:63
bool operator==(const SError &Other) const
Definition: backend_base.h:66
Definition: backend_base.h:60
std::vector< SError > m_vErrors
Definition: backend_base.h:72
EGfxErrorType m_ErrorType
Definition: backend_base.h:71
Definition: backend_base.h:76
EGfxWarningType m_WarningType
Definition: backend_base.h:77
std::vector< std::string > m_vWarnings
Definition: backend_base.h:78
Definition: graphics.h:154