- check the proper command line option for rejecting a core profile.

This commit is contained in:
Christoph Oelckers 2016-04-26 15:19:38 +02:00
parent 97bed58d7d
commit 8b5c741358

View file

@ -747,8 +747,12 @@ typedef const GLubyte * (APIENTRY *PFNGLGETSTRINGIPROC)(GLenum, GLuint);
bool Win32GLVideo::checkCoreUsability() bool Win32GLVideo::checkCoreUsability()
{ {
// if we explicitly want to disable 4.x features this must fail. const char *version = Args->CheckValue("-glversion");
if (Args->CheckParm("-gl3")) return false; 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 // GL 4.4 implies GL_ARB_buffer_storage
if (strcmp((char*)glGetString(GL_VERSION), "4.4") >= 0) return true; if (strcmp((char*)glGetString(GL_VERSION), "4.4") >= 0) return true;