]> git.mxchange.org Git - simgear.git/commitdiff
Restore lights in the Rembrandt renderer
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 30 May 2012 20:18:57 +0000 (22:18 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Wed, 30 May 2012 20:18:57 +0000 (22:18 +0200)
simgear/scene/model/SGLightAnimation.cxx
simgear/scene/model/SGReaderWriterXML.cxx

index 5ecb07eebac276a8f7c45658402ea2181171012a..8e972c1ece21f40dffe9a9038873573694cab980 100644 (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);
+                    }
                 }
             }
         }
index 26a31a45a9ce68224272470494681c6313aab276..a04286910defb5a071a12630db6eff5476026bd5 100644 (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);
     {