Restore lights in the Rembrandt renderer

This commit is contained in:
Frederic Bouvier
2012-05-30 22:18:57 +02:00
parent edbea633f3
commit a41d5b1609
2 changed files with 6 additions and 3 deletions

View File

@@ -183,8 +183,10 @@ SGLightAnimation::install(osg::Node& node)
if (grp != 0) {
for (size_t i=0; i<grp->getNumChildren(); ++i) {
geode = dynamic_cast<simgear::EffectGeode*>(grp->getChild(i));
if (geode)
if (geode) {
geode->setNodeMask( simgear::MODELLIGHT_BIT );
geode->setEffect(effect);
}
}
}
}
@@ -226,8 +228,10 @@ SGLightAnimation::install(osg::Node& node)
if (grp != 0) {
for (size_t i=0; i<grp->getNumChildren(); ++i) {
geode = dynamic_cast<simgear::EffectGeode*>(grp->getChild(i));
if (geode)
if (geode) {
geode->setNodeMask( simgear::MODELLIGHT_BIT );
geode->setEffect(effect);
}
}
}
}

View File

@@ -447,7 +447,6 @@ sgLoad3DModel_internal(const SGPath& path,
PropertyList effect_nodes = props->getChildren("effect");
PropertyList animation_nodes = props->getChildren("animation");
PropertyList light_nodes = props->getChildren("light");
// Some material animations (eventually all) are actually effects.
makeEffectAnimations(animation_nodes, effect_nodes);
{