Enabled GLSW framebuffer in Cocoa backend by default

Added fallback to generic Cocoa implementation if it's not available (i.e. without OpenGL Core Profile support)
Value of vid_glswfb CVAR is now saved to configuration file
This commit is contained in:
alexey.lysiuk 2017-04-23 17:17:36 +03:00
parent f9735c44de
commit ab8759049d
1 changed files with 8 additions and 1 deletions

View File

@ -116,7 +116,7 @@
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool bgra, bool fullscreen);
CUSTOM_CVAR(Bool, vid_glswfb, false, CVAR_NOINITCALL)
CUSTOM_CVAR(Bool, vid_glswfb, true, CVAR_NOINITCALL | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
Printf("This won't take effect until " GAMENAME " is restarted.\n");
}
@ -658,6 +658,13 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer(const int width, const int height, c
else if (vid_glswfb)
{
fb = CreateGLSWFrameBuffer(width, height, bgra, fullscreen);
if (!fb->IsValid())
{
delete fb;
fb = new CocoaFrameBuffer(width, height, bgra, fullscreen);
}
}
else
{