Gui: [skip ci] add option to use software OpenGL

This commit is contained in:
wmayer
2020-12-17 16:27:36 +01:00
parent ccd8551f2b
commit b7bd7d229b
3 changed files with 29 additions and 0 deletions

View File

@@ -1923,6 +1923,15 @@ void Application::runApplication(void)
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
// Use software rendering for OpenGL
#if QT_VERSION >= 0x050400
ParameterGrp::handle hOpenGL = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OpenGL");
bool useSoftwareOpenGL = hOpenGL->GetBool("UseSoftwareOpenGL", false);
if (useSoftwareOpenGL) {
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
#endif // QT_VERSION >= 0x050400
// A new QApplication
Base::Console().Log("Init: Creating Gui::Application and QApplication\n");