mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Fix setting of the gl_legacy_mode cvar.
This commit is contained in:
parent
3b818171d5
commit
c698f10257
2 changed files with 9 additions and 3 deletions
|
@ -324,7 +324,10 @@ void gl_LoadExtensions()
|
|||
FUDGE_FUNC(glBindRenderbuffer, EXT);
|
||||
FUDGE_FUNC(glCheckFramebufferStatus, EXT);
|
||||
}
|
||||
gl_legacy_mode = gl.legacyMode;
|
||||
|
||||
UCVarValue value;
|
||||
value.Bool = gl.legacyMode;
|
||||
gl_legacy_mode.ForceSet (value, CVAR_Bool);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -207,12 +207,15 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
|
|||
const char *glversion = (const char*)glGetString(GL_VERSION);
|
||||
bool isGLES = (glversion && strlen(glversion) > 10 && memcmp(glversion, "OpenGL ES ", 10) == 0);
|
||||
|
||||
UCVarValue value;
|
||||
// GL 3.0 is mostly broken on MESA drivers which really are the only relevant case here that doesn't fulfill the requirements based on version number alone.
|
||||
#ifdef _WIN32
|
||||
gl_legacy_mode = !ogl_IsVersionGEQ(3, 0);
|
||||
value.Bool = !ogl_IsVersionGEQ(3, 0);
|
||||
#else
|
||||
gl_legacy_mode = !ogl_IsVersionGEQ(3, 1);
|
||||
value.Bool = !ogl_IsVersionGEQ(3, 1);
|
||||
#endif
|
||||
gl_legacy_mode.ForceSet (value, CVAR_Bool);
|
||||
|
||||
if (!isGLES && ogl_IsVersionGEQ(3, 0) == 0)
|
||||
{
|
||||
Printf("OpenGL acceleration requires at least OpenGL 3.0. No Acceleration will be used.\n");
|
||||
|
|
Loading…
Reference in a new issue