This commit is contained in:
vlj 2014-04-20 02:56:10 +02:00
commit d0afcce32d
3 changed files with 35 additions and 7 deletions

View File

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

View File

@ -1318,7 +1318,7 @@ void Track::handleExplosion(const Vec3 &pos, const PhysicalObject *obj,
} // handleExplosion } // handleExplosion
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
/** Creates a water node. /** Creates a water node. OBSOLETE, kept for backwards compat only
* \param node The XML node containing the specifications for the water node. * \param node The XML node containing the specifications for the water node.
*/ */
void Track::createWater(const XMLNode &node) void Track::createWater(const XMLNode &node)
@ -1328,8 +1328,13 @@ void Track::createWater(const XMLNode &node)
std::string full_path = m_root+model_name; std::string full_path = m_root+model_name;
scene::IMesh *mesh = irr_driver->getMesh(full_path); scene::IMesh *mesh = irr_driver->getMesh(full_path);
if (mesh == NULL) return; if (mesh == NULL)
{
Log::warn("Track", "Water not found : '%s'", full_path.c_str());
return;
}
/*
float wave_height = 2.0f; float wave_height = 2.0f;
float wave_speed = 300.0f; float wave_speed = 300.0f;
float wave_length = 10.0f; float wave_length = 10.0f;
@ -1351,11 +1356,12 @@ void Track::createWater(const XMLNode &node)
wave_speed =300.0f; wave_speed =300.0f;
} }
node.get("length", &wave_length); node.get("length", &wave_length);
*/
scene::ISceneNode* scene_node = NULL; scene::ISceneNode* scene_node = NULL;
/*
if (UserConfigParams::m_graphical_effects) if (UserConfigParams::m_graphical_effects)
{ {
/*scene::IMesh *welded; scene::IMesh *welded;
scene_node = irr_driver->addWaterNode(mesh, &welded, scene_node = irr_driver->addWaterNode(mesh, &welded,
wave_height, wave_height,
wave_speed, wave_speed,
@ -1365,12 +1371,12 @@ void Track::createWater(const XMLNode &node)
irr_driver->grabAllTextures(mesh); irr_driver->grabAllTextures(mesh);
m_all_cached_meshes.push_back(mesh); m_all_cached_meshes.push_back(mesh);
mesh = welded;*/ mesh = welded;
} }
else else
{ {*/
scene_node = irr_driver->addMesh(mesh); scene_node = irr_driver->addMesh(mesh);
} //}
if(!mesh || !scene_node) if(!mesh || !scene_node)
{ {