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 | 234384ece9c70f2a803ed2b1d1eb55b248ec43d1 (patch) | |
tree | a69fa3e64179667d79546f4f3d1b33f041e4ea22 /platform/android/src/native_map_view.cpp | |
parent | 8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78 (diff) | |
download | qtlocation-mapboxgl-234384ece9c70f2a803ed2b1d1eb55b248ec43d1.tar.gz |
[core] Move OpenGL extension initialization to Backend
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-x | platform/android/src/native_map_view.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index c65c241458..eeb4620c2e 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -15,7 +15,6 @@ #include <jni/jni.hpp> #include <mbgl/gl/context.hpp> -#include <mbgl/gl/extension.hpp> #include <mbgl/map/backend_scope.hpp> #include <mbgl/util/constants.hpp> #include <mbgl/util/event.hpp> @@ -108,6 +107,10 @@ void NativeMapView::bind() { /** * From mbgl::Backend. */ +gl::ProcAddress NativeMapView::initializeExtension(const char* name) { + return eglGetProcAddress(name); +} + void NativeMapView::activate() { if (active++) { return; @@ -1394,10 +1397,6 @@ void NativeMapView::_createSurface(ANativeWindow *window_) { eglGetError()); throw std::runtime_error("eglMakeCurrent() failed"); } - - mbgl::gl::InitializeExtensions([] (const char * name) { - return reinterpret_cast<mbgl::gl::glProc>(eglGetProcAddress(name)); - }); } } |