Skip to content

Commit

Permalink
OpenGL: Added -noglcheck to override version check
Browse files Browse the repository at this point in the history
If for any reason the OpenGL version check fails to detect the
correct version, -noglcheck can be used to try and launch
the engine anyway.
  • Loading branch information
skyjake committed Jan 6, 2012
1 parent 3cc2ad6 commit 221ec06
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions doomsday/engine/portable/src/sys_opengl.c
Expand Up @@ -465,11 +465,26 @@ boolean Sys_GLInitialize(void)
if(firstTimeInit)
{
double version = strtod((const char*) glGetString(GL_VERSION), NULL);
if(version < 1.4)
if(version == 0)
{
Sys_CriticalMessagef("OpenGL implementation reports version %.1f\n"
"The minimum supported version is 1.4", version);
return false;
Con_Message("Sys_GLInitialize: Failed to determine OpenGL version.\n");
Con_Message(" OpenGL version: %s\n", glGetString(GL_VERSION));
}
else if(version < 1.4)
{
if(!ArgExists("-noglcheck"))
{
Sys_CriticalMessagef("OpenGL implementation is too old!\n"
" Driver version: %s\n"
" The minimum supported version is 1.4",
glGetString(GL_VERSION));
return false;
}
else
{
Con_Message("Sys_GLInitialize: Warning: OpenGL implementation may be too old (1.4+ required).\n");
Con_Message(" OpenGL version: %s\n", glGetString(GL_VERSION));
}
}

initialize();
Expand Down

0 comments on commit 221ec06

Please sign in to comment.