summaryrefslogtreecommitdiff
path: root/platform/qt/app/mapwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/app/mapwindow.cpp')
-rw-r--r--platform/qt/app/mapwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp
index e29e62f157..926d504904 100644
--- a/platform/qt/app/mapwindow.cpp
+++ b/platform/qt/app/mapwindow.cpp
@@ -399,5 +399,9 @@ void MapWindow::paintGL()
{
m_frameDraws++;
m_map->resize(size(), size() * pixelRatio());
+#if QT_VERSION >= 0x050400
+ // When we're using QOpenGLWidget, we need to tell Mapbox GL about the framebuffer we're using.
+ m_map->setFramebufferObject(defaultFramebufferObject());
+#endif
m_map->render();
}