summaryrefslogtreecommitdiff
path: root/include/mbgl/gl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-14 13:49:53 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-18 13:27:35 +0200
commitee72e93f94c7b9ea20144287bcd473d35f07e9ed (patch)
tree2fd339d7f20cacf59d3e740a14417a62a02cef55 /include/mbgl/gl
parentcd13e2b769a937a805ca4bc509c07524a6a949de (diff)
downloadqtlocation-mapboxgl-ee72e93f94c7b9ea20144287bcd473d35f07e9ed.tar.gz
[gl] Moved VAO helpers to common header
Diffstat (limited to 'include/mbgl/gl')
-rw-r--r--include/mbgl/gl/gl.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/mbgl/gl/gl.hpp b/include/mbgl/gl/gl.hpp
index 59a3bf2ef2..2d9b3f7a71 100644
--- a/include/mbgl/gl/gl.hpp
+++ b/include/mbgl/gl/gl.hpp
@@ -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