feat(gx): detach CGxDeviceGLSDL from GxApi_OpenGl handling

This commit is contained in:
superp00t 2023-12-10 19:04:57 -05:00
parent c6cf2814df
commit 6bf87c4f2d
2 changed files with 8 additions and 2 deletions

View File

@ -123,14 +123,17 @@ CGxDevice* CGxDevice::NewGLL() {
}
#endif
CGxDevice* CGxDevice::NewOpenGl() {
return nullptr;
}
#if defined(WHOA_SYSTEM_WIN) || defined(WHOA_SYSTEM_LINUX)
CGxDevice* CGxDevice::NewOpenGl() {
CGxDevice* CGxDevice::NewGLSDL() {
auto m = SMemAlloc(sizeof(CGxDeviceGLSDL), __FILE__, __LINE__, 0x0);
return new (m) CGxDeviceGLSDL();
}
#else
CGxDevice* CGxDevice::NewOpenGl() {
CGxDevice* CGxDevice::NewGLSDL() {
return nullptr;
}
#endif

View File

@ -56,6 +56,9 @@ class CGxDevice {
#endif
#if defined(WHOA_SYSTEM_MAC)
static CGxDevice* NewGLL();
#endif
#if defined(WHOA_SYSTEM_LINUX) || defined(WHOA_SYSTEM_WIN)
static CGxDevice* NewGLSDL();
#endif
static CGxDevice* NewOpenGl();
static uint32_t PrimCalcCount(EGxPrim primType, uint32_t count);