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 /include/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 'include/mbgl/gl')
-rw-r--r-- | include/mbgl/gl/gl.hpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/include/mbgl/gl/gl.hpp b/include/mbgl/gl/gl.hpp index 2d9b3f7a71..5ef76cf1da 100644 --- a/include/mbgl/gl/gl.hpp +++ b/include/mbgl/gl/gl.hpp @@ -110,31 +110,14 @@ 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"} - }); +extern ExtensionFunction<void (GLuint array)> + BindVertexArray; + +extern ExtensionFunction<void (GLsizei n, const GLuint* arrays)> + DeleteVertexArrays; + +extern ExtensionFunction<void (GLsizei n, GLuint* arrays)> + GenVertexArrays; } // namespace gl } // namespace mbgl |