mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- Detect dinosaur OpenGL and refuse to use it
This commit is contained in:
parent
e690de25a8
commit
b7482e10e2
1 changed files with 13 additions and 0 deletions
|
@ -200,6 +200,19 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const char *glversion = (const char*)glGetString(GL_VERSION);
|
||||
bool isGLES = (glversion && strlen(glversion) > 10 && memcmp(glversion, "OpenGL ES ", 10) == 0);
|
||||
if (isGLES && ogl_IsVersionGEQ(2, 0) == 0)
|
||||
{
|
||||
Printf("OpenGL acceleration requires at least OpenGL ES 2.0. No Acceleration will be used.\n");
|
||||
return;
|
||||
}
|
||||
else if (!isGLES && ogl_IsVersionGEQ(3, 0) == 0)
|
||||
{
|
||||
Printf("OpenGL acceleration requires at least OpenGL 3.0. No Acceleration will be used.\n");
|
||||
return;
|
||||
}
|
||||
gl_LoadExtensions();
|
||||
InitializeState();
|
||||
if (first)
|
||||
|
|
Loading…
Reference in a new issue