summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/vertex_array.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-09-28 17:21:20 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-29 13:19:27 -0700
commit2ec2860ce5de2bde751086db13de1c09e643c28c (patch)
treed9539718dde07e3ddeaf2b502032828157a25e27 /src/mbgl/gl/vertex_array.cpp
parentcc78b74098e02311cc646fe5b82c13641ff705fa (diff)
downloadqtlocation-mapboxgl-2ec2860ce5de2bde751086db13de1c09e643c28c.tar.gz
[core] move OpenGL extension loading to their own headers
Diffstat (limited to 'src/mbgl/gl/vertex_array.cpp')
-rw-r--r--src/mbgl/gl/vertex_array.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mbgl/gl/vertex_array.cpp b/src/mbgl/gl/vertex_array.cpp
new file mode 100644
index 0000000000..df63bbc4b7
--- /dev/null
+++ b/src/mbgl/gl/vertex_array.cpp
@@ -0,0 +1,22 @@
+#include <mbgl/gl/vertex_array.hpp>
+
+namespace mbgl {
+namespace gl {
+
+ExtensionFunction<void(GLuint array)>
+ BindVertexArray({ { "GL_ARB_vertex_array_object", "glBindVertexArray" },
+ { "GL_OES_vertex_array_object", "glBindVertexArrayOES" },
+ { "GL_APPLE_vertex_array_object", "glBindVertexArrayAPPLE" } });
+
+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" } });
+
+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