Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Set RHI backend to OpenGL on macOS

Freya Lupenf2fe947226a1
diff --git a/krita/main.cc b/krita/main.cc
index 5ca2e7034d..3f9ef04d6a 100644
--- a/krita/main.cc
+++ b/krita/main.cc
@@ -422,9 +422,10 @@ extern "C" MAIN_EXPORT int MAIN_FN(int argc, char **argv)
KisOpenGL::setDefaultSurfaceConfig(config);
KisOpenGL::setDebugSynchronous(openGLDebugSynchronous);
-#if defined Q_OS_WIN
+#if defined Q_OS_WIN || defined Q_OS_MACOS
qputenv("QT_WIDGETS_RHI", "1");
qputenv("QT_WIDGETS_RHI_BACKEND", "opengl");
+ qputenv("QSG_RHI_BACKEND", "opengl");
#endif
#ifdef Q_OS_WIN