Gui: [skip ci] add option to use software OpenGL
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -108,6 +108,24 @@ will be shown at the lower left corner in opened files</string>
|
||||
<string>Rendering</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="CheckBox_use_SW_OpenGL">
|
||||
<property name="toolTip">
|
||||
<string>This option is useful for troubleshooting graphics card and driver problems.
|
||||
|
||||
Changing this option requires a restart of the application.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use software OpenGL</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>UseSoftwareOpenGL</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>OpenGL</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="CheckBox_useVBO">
|
||||
<property name="toolTip">
|
||||
|
||||
@@ -93,6 +93,7 @@ void DlgSettings3DViewImp::saveSettings()
|
||||
ui->CheckBox_WbByTab->onSave();
|
||||
ui->CheckBox_ShowFPS->onSave();
|
||||
ui->spinPickRadius->onSave();
|
||||
ui->CheckBox_use_SW_OpenGL->onSave();
|
||||
ui->CheckBox_useVBO->onSave();
|
||||
ui->FloatSpinBox_EyeDistance->onSave();
|
||||
ui->checkBoxBacklight->onSave();
|
||||
@@ -109,6 +110,7 @@ void DlgSettings3DViewImp::loadSettings()
|
||||
ui->CheckBox_WbByTab->onRestore();
|
||||
ui->CheckBox_ShowFPS->onRestore();
|
||||
ui->spinPickRadius->onRestore();
|
||||
ui->CheckBox_use_SW_OpenGL->onRestore();
|
||||
ui->CheckBox_useVBO->onRestore();
|
||||
ui->FloatSpinBox_EyeDistance->onRestore();
|
||||
ui->checkBoxBacklight->onRestore();
|
||||
|
||||
Reference in New Issue
Block a user