1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-25 22:09:35 +00:00

Add "Enable shaders storage" checkbox to GUI.

This commit is contained in:
Sergey Lipskiy 2015-10-03 19:43:19 +06:00
parent f59840250c
commit 4cc253db62
3 changed files with 14 additions and 0 deletions

View File

@ -111,6 +111,7 @@ void ConfigDialog::_init()
ui->emulateNoiseCheckBox->setChecked(config.generalEmulation.enableNoise != 0);
ui->emulateFogCheckBox->setChecked(config.generalEmulation.enableFog != 0);
ui->enableHWLightingCheckBox->setChecked(config.generalEmulation.enableHWLighting != 0);
ui->enableShadersStorageCheckBox->setChecked(config.generalEmulation.enableShadersStorage != 0);
ui->customSettingsCheckBox->setChecked(config.generalEmulation.enableCustomSettings != 0);
ui->frameBufferGroupBox->setChecked(config.frameBufferEmulation.enable != 0);
@ -280,6 +281,7 @@ void ConfigDialog::accept()
config.generalEmulation.enableNoise = ui->emulateNoiseCheckBox->isChecked() ? 1 : 0;
config.generalEmulation.enableFog = ui->emulateFogCheckBox->isChecked() ? 1 : 0;
config.generalEmulation.enableHWLighting = ui->enableHWLightingCheckBox->isChecked() ? 1 : 0;
config.generalEmulation.enableShadersStorage = ui->enableShadersStorageCheckBox->isChecked() ? 1 : 0;
config.generalEmulation.enableCustomSettings = ui->customSettingsCheckBox->isChecked() ? 1 : 0;
config.frameBufferEmulation.enable = ui->frameBufferGroupBox->isChecked() ? 1 : 0;

View File

@ -40,6 +40,7 @@ void _loadSettings(QSettings & settings)
config.generalEmulation.enableNoise = settings.value("enableNoise", config.generalEmulation.enableNoise).toInt();
config.generalEmulation.enableLOD = settings.value("enableLOD", config.generalEmulation.enableLOD).toInt();
config.generalEmulation.enableHWLighting = settings.value("enableHWLighting", config.generalEmulation.enableHWLighting).toInt();
config.generalEmulation.enableShadersStorage = settings.value("enableShadersStorage", config.generalEmulation.enableShadersStorage).toInt();
config.generalEmulation.enableCustomSettings = settings.value("enableCustomSettings", config.generalEmulation.enableCustomSettings).toInt();
settings.endGroup();
@ -142,6 +143,7 @@ void writeSettings(const QString & _strIniFolder)
settings.setValue("enableNoise", config.generalEmulation.enableNoise);
settings.setValue("enableLOD", config.generalEmulation.enableLOD);
settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting);
settings.setValue("enableShadersStorage", config.generalEmulation.enableShadersStorage);
settings.setValue("enableCustomSettings", config.generalEmulation.enableCustomSettings);
settings.endGroup();

View File

@ -608,6 +608,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableShadersStorageCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Shaders storage:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Use persistent storage for compiled shader programs.&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Each game uses set of combiners. Combiner is an equation, which defines how to build output color from various color inputs. The plugin translates combiners to &lt;a href=&quot;https://www.opengl.org/wiki/Shader&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;shaders&lt;/span&gt;&lt;/a&gt;. Shader compiler builds programs from them on fly. Shaders are large and complex. If new scene uses several new combiners, compilation of new shaders will take time and you will notice that as some stuttering. If you have shader storage enabled, all shaders will be compiled only once. Next time you run the game, plugin will not spend time on compilation of shaders, which you already met.&lt;/p&gt;&lt;p&gt;[Recommended: &lt;span style=&quot; font-style:italic;&quot;&gt;on&lt;/span&gt;]&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable shaders storage</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="customSettingsCheckBox">
<property name="toolTip">