Don't crash if VAO extensions are not available

Fixes #1585
This commit is contained in:
John Firebaugh
2015-05-18 16:33:54 -07:00
parent 4af4c817f1
commit 63ea3d4bef
3 changed files with 5 additions and 4 deletions

View File

@@ -31,8 +31,9 @@ static gl::ExtensionFunction<
{"GL_APPLE_vertex_array_object", "glGenVertexArraysAPPLE"}
});
void VertexArrayObject::Bind(GLuint array) {
MBGL_CHECK_ERROR(BindVertexArray(array));
void VertexArrayObject::Unbind() {
if (!BindVertexArray) return;
MBGL_CHECK_ERROR(BindVertexArray(0));
}
void VertexArrayObject::Delete(GLsizei n, const GLuint* arrays) {