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 | 8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78 (patch) | |
tree | cf79b67b4af670438cbc79a524be82e88da83904 /platform/ios/src/MGLMapView.mm | |
parent | d7227e13a7a87cf50a4c8c1f0615fc565f5a2679 (diff) | |
download | qtlocation-mapboxgl-8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78.tar.gz |
[core] Ensure that a BackendScope exists when doing GL calls
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 1ccd5ce355..6bd3092445 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -21,6 +21,7 @@ #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/custom_layer.hpp> #include <mbgl/map/backend.hpp> +#include <mbgl/map/backend_scope.hpp> #include <mbgl/math/wrap.hpp> #include <mbgl/util/exception.hpp> #include <mbgl/util/geo.hpp> @@ -881,6 +882,9 @@ public: { if ( ! self.dormant) { + // The OpenGL implementation automatically enables the OpenGL context for us. + mbgl::BackendScope scope { *_mbglView, mbgl::BackendScope::ScopeType::Implicit }; + _mbglView->updateViewBinding(); _mbglMap->render(*_mbglView); |