diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-28 17:21:20 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-29 13:19:27 -0700 |
commit | 2ec2860ce5de2bde751086db13de1c09e643c28c (patch) | |
tree | d9539718dde07e3ddeaf2b502032828157a25e27 /src/mbgl/gl/vertex_array.cpp | |
parent | cc78b74098e02311cc646fe5b82c13641ff705fa (diff) | |
download | qtlocation-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.cpp | 22 |
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 |