GUI option to control new GLLegacy option
Needs to be removed when compiled against GLES.
This commit is contained in:
parent
c2367fabe0
commit
c37b7cdcba
2 changed files with 18 additions and 2 deletions
|
@ -124,6 +124,7 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
|
||||
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.glVSync, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.glShaders, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
|
||||
// Open the temporary config file
|
||||
// Temporary conf file is used to synchronize effect checkboxes with effect
|
||||
|
@ -407,6 +408,7 @@ void KWinCompositingConfig::loadAdvancedTab()
|
|||
|
||||
ui.glDirect->setChecked(config.readEntry("GLDirect", mDefaultPrefs.enableDirectRendering()));
|
||||
ui.glVSync->setChecked(config.readEntry("GLVSync", mDefaultPrefs.enableVSync()));
|
||||
ui.glShaders->setChecked(!config.readEntry<bool>("GLLegacy", false));
|
||||
|
||||
toogleSmoothScaleUi(ui.compositingType->currentIndex());
|
||||
}
|
||||
|
@ -539,7 +541,8 @@ bool KWinCompositingConfig::saveAdvancedTab()
|
|||
|| config.readEntry("GLDirect", mDefaultPrefs.enableDirectRendering())
|
||||
!= ui.glDirect->isChecked()
|
||||
|| config.readEntry("GLVSync", mDefaultPrefs.enableVSync()) != ui.glVSync->isChecked()
|
||||
|| config.readEntry("DisableChecks", false) != ui.disableChecks->isChecked()) {
|
||||
|| config.readEntry("DisableChecks", false) != ui.disableChecks->isChecked()
|
||||
|| config.readEntry<bool>("GLLegacy", false) == ui.glShaders->isChecked()) {
|
||||
m_showConfirmDialog = true;
|
||||
advancedChanged = true;
|
||||
} else if (config.readEntry("HiddenPreviews", 5) != hps[ ui.windowThumbnails->currentIndex()]
|
||||
|
@ -557,6 +560,7 @@ bool KWinCompositingConfig::saveAdvancedTab()
|
|||
|
||||
config.writeEntry("GLDirect", ui.glDirect->isChecked());
|
||||
config.writeEntry("GLVSync", ui.glVSync->isChecked());
|
||||
config.writeEntry("GLLegacy", !ui.glShaders->isChecked());
|
||||
|
||||
|
||||
return advancedChanged;
|
||||
|
@ -690,6 +694,7 @@ void KWinCompositingConfig::defaults()
|
|||
ui.glScaleFilter->setCurrentIndex(2);
|
||||
ui.glDirect->setChecked(mDefaultPrefs.enableDirectRendering());
|
||||
ui.glVSync->setChecked(mDefaultPrefs.enableVSync());
|
||||
ui.glShaders->setChecked(true);
|
||||
}
|
||||
|
||||
QString KWinCompositingConfig::quickHelp() const
|
||||
|
|
|
@ -610,7 +610,7 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="glVSync">
|
||||
<property name="text">
|
||||
<string>Use VSync</string>
|
||||
|
@ -620,6 +620,17 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="glShaders">
|
||||
<property name="toolTip">
|
||||
<string>If enabled all rendering will be perfomed with Shaders written in the OpenGL Shading Language.
|
||||
On legacy hardware disabling Shaders can improve the performance.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use OpenGL 2 Shaders</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue