From 8b5c741358fa3e3b3f21fe0fdd2530cf3c17802a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 26 Apr 2016 15:19:38 +0200 Subject: [PATCH] - check the proper command line option for rejecting a core profile. --- src/win32/win32gliface.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index 27cb562e2d..4ba6ad3007 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -747,8 +747,12 @@ typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC)(GLenum, GLuint); bool Win32GLVideo::checkCoreUsability() { - // if we explicitly want to disable 4.x features this must fail. - if (Args->CheckParm("-gl3")) return false; + const char *version = Args->CheckValue("-glversion"); + if (version != NULL) + { + if (strtod(version, NULL) < 4.0) return false; + } + if (Args->CheckParm("-noshader")) return false; // GL 4.4 implies GL_ARB_buffer_storage if (strcmp((char*)glGetString(GL_VERSION), "4.4") >= 0) return true;