summaryrefslogtreecommitdiff
path: root/platform/qt/src/qmapboxgl.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-02-27 18:33:16 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-03-23 14:50:11 -0700
commit8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78 (patch)
treecf79b67b4af670438cbc79a524be82e88da83904 /platform/qt/src/qmapboxgl.cpp
parentd7227e13a7a87cf50a4c8c1f0615fc565f5a2679 (diff)
downloadqtlocation-mapboxgl-8e5214144ec4f3a4fb40b7a7e4d8f09fd10dbb78.tar.gz
[core] Ensure that a BackendScope exists when doing GL calls
Diffstat (limited to 'platform/qt/src/qmapboxgl.cpp')
-rw-r--r--platform/qt/src/qmapboxgl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index 3d5da10c36..384bdc8ebf 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -8,6 +8,7 @@
#include <mbgl/map/camera.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/gl/context.hpp>
+#include <mbgl/map/backend_scope.hpp>
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/conversion/layer.hpp>
#include <mbgl/style/conversion/source.hpp>
@@ -1495,6 +1496,9 @@ void QMapboxGL::render()
}
#endif
+ // The OpenGL implementation automatically enables the OpenGL context for us.
+ mbgl::BackendScope scope { *d_ptr, mbgl::BackendScope::ScopeType::Implicit };
+
d_ptr->dirty = false;
d_ptr->updateViewBinding();
d_ptr->mapObj->render(*d_ptr);