From 8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 27 Feb 2017 18:33:16 +0100 Subject: [core] Ensure that a BackendScope exists when doing GL calls --- platform/ios/src/MGLMapView.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/ios/src/MGLMapView.mm') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.1