diff options
Diffstat (limited to 'platform/qt/test/qmapboxgl.test.cpp')
-rw-r--r-- | platform/qt/test/qmapboxgl.test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/qt/test/qmapboxgl.test.cpp b/platform/qt/test/qmapboxgl.test.cpp index c6ae3ed403..932460b932 100644 --- a/platform/qt/test/qmapboxgl.test.cpp +++ b/platform/qt/test/qmapboxgl.test.cpp @@ -7,6 +7,9 @@ // We're using QGLFramebufferObject, which is only available in Qt 5 and up. #if QT_VERSION >= 0x050000 +#include <QOpenGLContext> +#include <QOpenGLFunctions> + QMapboxGLTest::QMapboxGLTest() : size(512, 512), fbo((assert(widget.context()->isValid()), widget.makeCurrent(), size)), map(nullptr, settings, size) { connect(&map, SIGNAL(mapChanged(QMapboxGL::MapChange)), this, SLOT(onMapChanged(QMapboxGL::MapChange))); @@ -37,7 +40,7 @@ void QMapboxGLTest::onMapChanged(QMapboxGL::MapChange change) { void QMapboxGLTest::onNeedsRendering() { widget.makeCurrent(); fbo.bind(); - glViewport(0, 0, fbo.width(), fbo.height()); + QOpenGLContext::currentContext()->functions()->glViewport(0, 0, fbo.width(), fbo.height()); map.render(); } |