diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-02-27 18:33:16 +0100 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-23 14:50:11 -0700 |
commit | e67abfbe67d7c08e90fdbd8727c4e9ed17dfa1ed (patch) | |
tree | 8bf1a6ae813afdfe44bd8d6210337141acd53bae /src/mbgl/gl/vertex_array.cpp | |
parent | 234384ece9c70f2a803ed2b1d1eb55b248ec43d1 (diff) | |
download | qtlocation-mapboxgl-e67abfbe67d7c08e90fdbd8727c4e9ed17dfa1ed.tar.gz |
[core] Refactor OpenGL extension loading mechanism
Previously, we initialized global variables that held pointers to the extension functions. While this seemed to work, the spec doesn't guarantee that the function pointers are identical for different OpenGL contexts. Therefore, we are now making them a member variable of the Context object.
Diffstat (limited to 'src/mbgl/gl/vertex_array.cpp')
-rw-r--r-- | src/mbgl/gl/vertex_array.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/mbgl/gl/vertex_array.cpp b/src/mbgl/gl/vertex_array.cpp deleted file mode 100644 index df63bbc4b7..0000000000 --- a/src/mbgl/gl/vertex_array.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#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 |