feat(gx): detach CGxDeviceGLSDL from GxApi_OpenGl handling

This commit is contained in:
phaneron 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