From 21d705b16cad800e455a7fcfd757b4b038167b32 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 16 May 2022 12:43:53 +0100 Subject: [PATCH] Set QTWEBENGINE_CHROMIUM_FLAGS to --ignore-gpu-blacklist on MacOS, so WebGL in 3D Map works --- app/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 045b6e88a..ae0a7b40d 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -133,6 +133,13 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo int main(int argc, char* argv[]) { +#ifdef __APPLE__ + // Enable WebGL in QtWebEngine when OpenGL is only version 2.1 (Needed for 3D Map) + // This can be removed when we eventually request a 4.1 OpenGL context + // This needs to be executed before any other Qt code + qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--ignore-gpu-blacklist"); +#endif + qtwebapp::LoggerWithFile *logger = new qtwebapp::LoggerWithFile(qApp); logger->installMsgHandler(); int res = runQtApplication(argc, argv, logger);