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++

Force openGL mode for QRhi

Dmitry Kazakov0ee13fb67e4e
diff --git a/krita/main.cc b/krita/main.cc
index 50183dd107..5ca2e7034d 100644
--- a/krita/main.cc
+++ b/krita/main.cc
@@ -422,6 +422,11 @@ extern "C" MAIN_EXPORT int MAIN_FN(int argc, char **argv)
KisOpenGL::setDefaultSurfaceConfig(config);
KisOpenGL::setDebugSynchronous(openGLDebugSynchronous);
+#if defined Q_OS_WIN
+ qputenv("QT_WIDGETS_RHI", "1");
+ qputenv("QT_WIDGETS_RHI_BACKEND", "opengl");
+#endif
+
#ifdef Q_OS_WIN
// HACK: https://bugs.kde.org/show_bug.cgi?id=390651
resetRotation();