diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-14 12:11:02 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-14 12:11:02 -0700 |
commit | a47ab85283bea14bcc464526701bafaf1b8312e2 (patch) | |
tree | 236f35eb254a4f717674488f8f49830334d7a5e3 /src/mbgl/gl | |
parent | db9fb97ea824bea576222b51a841a6814a9c00d1 (diff) | |
download | qtlocation-mapboxgl-a47ab85283bea14bcc464526701bafaf1b8312e2.tar.gz |
[core] Don't put static objects in a header file (#4707)
This causes duplicate objects -- one for every file that includes that header.
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/gl.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mbgl/gl/gl.cpp b/src/mbgl/gl/gl.cpp index c57717aa87..48f00ec177 100644 --- a/src/mbgl/gl/gl.cpp +++ b/src/mbgl/gl/gl.cpp @@ -10,6 +10,27 @@ 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"} + }); + std::vector<ExtensionFunctionBase*>& ExtensionFunctionBase::functions() { static std::vector<ExtensionFunctionBase*> functions; return functions; |