Add UBOs flag to graphics options

This commit is contained in:
Marianne Gagnon 2014-04-19 20:23:49 -04:00
parent e8b36f2490
commit 8e579d4874
2 changed files with 22 additions and 0 deletions

View File

@ -114,6 +114,24 @@
</div>
</div>
<spacer height="4" width="10" />
<div layout="horizontal-row" width="100%" height="fit">
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="ubo"/>
<spacer width="10" height="10"/>
<label text="Uniform buffer objects" I18N="Video settings"/>
</div>
<spacer height="4" width="10" />
<!--
<div layout="horizontal-row" proportion="1" height="fit">
<checkbox id="anim_gfx"/>
<spacer width="10" height="10"/>
<label text="Animated Scenery" I18N="Video settings"/>
</div>
-->
</div>
<spacer height="20" width="10" />

View File

@ -51,6 +51,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
{
getWidget<CheckBoxWidget>("anim_gfx")->setState( UserConfigParams::m_graphical_effects );
getWidget<CheckBoxWidget>("weather_gfx")->setState( UserConfigParams::m_weather_effects );
getWidget<CheckBoxWidget>("ubo")->setState(!UserConfigParams::m_ubo_disabled);
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
kart_anim->addLabel( _("Disabled") ); // 0
@ -105,6 +106,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
getWidget<CheckBoxWidget>("anim_gfx")->getState();
UserConfigParams::m_weather_effects =
getWidget<CheckBoxWidget>("weather_gfx")->getState();
UserConfigParams::m_ubo_disabled =
!getWidget<CheckBoxWidget>("ubo")->getState();
UserConfigParams::m_motionblur =
getWidget<CheckBoxWidget>("motionblur")->getState();
UserConfigParams::m_show_steering_animations =