[gl] Moved VAO helpers to common header

This commit is contained in:
Bruno de Oliveira Abinader
2016-02-14 13:49:53 +02:00
parent cd13e2b769
commit ee72e93f94
2 changed files with 34 additions and 34 deletions

View File

@@ -110,6 +110,32 @@ public:
using glProc = void (*)();
void InitializeExtensions(glProc (*getProcAddress)(const char *));
static gl::ExtensionFunction<
void (GLuint array)>
BindVertexArray({
{"GL_ARB_vertex_array_object", "glBindVertexArray"},
{"GL_OES_vertex_array_object", "glBindVertexArrayOES"},
{"GL_APPLE_vertex_array_object", "glBindVertexArrayAPPLE"}
});
static gl::ExtensionFunction<
void (GLsizei n,
const GLuint* arrays)>
DeleteVertexArrays({
{"GL_ARB_vertex_array_object", "glDeleteVertexArrays"},
{"GL_OES_vertex_array_object", "glDeleteVertexArraysOES"},
{"GL_APPLE_vertex_array_object", "glDeleteVertexArraysAPPLE"}
});
static gl::ExtensionFunction<
void (GLsizei n,
GLuint* arrays)>
GenVertexArrays({
{"GL_ARB_vertex_array_object", "glGenVertexArrays"},
{"GL_OES_vertex_array_object", "glGenVertexArraysOES"},
{"GL_APPLE_vertex_array_object", "glGenVertexArraysAPPLE"}
});
} // namespace gl
} // namespace mbgl