aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2023-11-16 17:17:46 +0100
committerTim Jenssen <tim.jenssen@qt.io>2023-11-16 17:17:46 +0100
commit9f1d23df00443d600abec93f4ce5e82b679ac6e0 (patch)
tree7e977f277baee0c441d60c4b78d90534985c9900 /src/app
parent3a5e0299c07184fa416295ca576806d12e581ab4 (diff)
parent245bd90a6e53421eafae6c8dfe4d71949f387eab (diff)
Merge remote-tracking branch 'origin/qds/dev'
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index b555596f87..ef5f5a1eb4 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -35,6 +35,7 @@
#include <QScopeGuard>
#include <QStandardPaths>
#include <QStyle>
+#include <QSurfaceFormat>
#include <QTextCodec>
#include <QTextStream>
#include <QThreadPool>
@@ -524,6 +525,15 @@ int main(int argc, char **argv)
}
}
+ if (Utils::HostOsInfo::isMacHost()) {
+ QSurfaceFormat surfaceFormat;
+ surfaceFormat.setStencilBufferSize(8);
+ surfaceFormat.setDepthBufferSize(24);
+ surfaceFormat.setVersion(4, 1);
+ surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
+ QSurfaceFormat::setDefaultFormat(surfaceFormat);
+ }
+
qputenv("QSG_RHI_BACKEND", "opengl");
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")