From a41d5b16098887602877cad6ff3daa04e3d60a31 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Wed, 30 May 2012 22:18:57 +0200 Subject: [PATCH] Restore lights in the Rembrandt renderer --- simgear/scene/model/SGLightAnimation.cxx | 8 ++++++-- simgear/scene/model/SGReaderWriterXML.cxx | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/simgear/scene/model/SGLightAnimation.cxx b/simgear/scene/model/SGLightAnimation.cxx index 5ecb07ee..8e972c1e 100644 --- a/simgear/scene/model/SGLightAnimation.cxx +++ b/simgear/scene/model/SGLightAnimation.cxx @@ -183,8 +183,10 @@ SGLightAnimation::install(osg::Node& node) if (grp != 0) { for (size_t i=0; igetNumChildren(); ++i) { geode = dynamic_cast(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; igetNumChildren(); ++i) { geode = dynamic_cast(grp->getChild(i)); - if (geode) + if (geode) { + geode->setNodeMask( simgear::MODELLIGHT_BIT ); geode->setEffect(effect); + } } } } diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index 26a31a45..a0428691 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -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); { -- 2.39.5