all repos — mgba @ d1d33393cd5b854f66e2fff3714acdb4a9c737c6

mGBA Game Boy Advance Emulator

OpenGL: Fix GL version check
Vicki Pfau vi@endrift.com
Fri, 24 May 2019 17:28:11 -0700
commit

d1d33393cd5b854f66e2fff3714acdb4a9c737c6

parent

89983901f8289119e4ed2b03a800f3e665af16a0

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/opengl/gles2.csrc/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;