OpenGL: Fix GL version check
Vicki Pfau vi@endrift.com
Fri, 24 May 2019 17:28:11 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/platform/opengl/gles2.c
→
src/platform/opengl/gles2.c
@@ -446,7 +446,7 @@ shader->uniforms[i].location = glGetUniformLocation(shader->program, shader->uniforms[i].name);
} const GLubyte* extensions = glGetString(GL_EXTENSIONS); - if (shaderBuffer[0] == _gles2Header || version[0] == '3' || strstr((const char*) extensions, "_vertex_array_object") != NULL) { + if (shaderBuffer[0] == _gles2Header || version[0] >= '3' || (extensions && strstr((const char*) extensions, "_vertex_array_object") != NULL)) { glGenVertexArrays(1, &shader->vao); } else { shader->vao = -1;