From aa8bb4d64864e0c3cfb9374a367e783602b75eba Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Mon, 19 Aug 2019 21:12:09 +0200 Subject: Improve debugging in mapboxgl plugin when running without opengl backend Change-Id: I252c163ad9296b52f14b83710fda0a469f882d73 Reviewed-by: Laszlo Agocs --- src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp index ed36cd5f..b0967499 100644 --- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp +++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp @@ -54,6 +54,7 @@ #include #include #include +#include // for debugging the context name #include @@ -101,6 +102,11 @@ QSGNode *QGeoMapMapboxGLPrivate::updateSceneGraph(QSGNode *node, QQuickWindow *w QOpenGLContext *currentCtx = QOpenGLContext::currentContext(); if (!currentCtx) { qWarning("QOpenGLContext is NULL!"); + qWarning() << "You are running on QSG backend " << QSGContext::backend(); + qWarning("The MapboxGL plugin works with both Desktop and ES 2.0+ OpenGL versions."); + qWarning("Verify that your Qt is built with OpenGL, and what kind of OpenGL."); + qWarning("To force using a specific OpenGL version, check QSurfaceFormat::setRenderableType and QSurfaceFormat::setDefaultFormat"); + return node; } if (m_useFBO) { -- cgit v1.2.1