]> git.mxchange.org Git - simgear.git/commitdiff
Hack to avoid redrawing the whole scene another time when only light volume are requested
authorFrederic Bouvier <fredfgfs01@free.fr>
Sat, 19 May 2012 17:39:38 +0000 (19:39 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Sat, 19 May 2012 17:39:38 +0000 (19:39 +0200)
simgear/scene/material/EffectCullVisitor.cxx

index 4f84552e56584dda0cc1ea3ee4ef583b869b0595..4559ee0b43b3c56dd1c1922dbbf6e48399ca731a 100644 (file)
@@ -52,6 +52,8 @@ CullVisitor* EffectCullVisitor::clone() const
 
 void EffectCullVisitor::apply(osg::Geode& node)
 {
+    if (node.getNodeMask() != simgear::MODELLIGHT_BIT ) // HACK
+        node.setNodeMask(node.getNodeMask() & ~simgear::MODELLIGHT_BIT);
     if (isCulled(node))
         return;
     EffectGeode *eg = dynamic_cast<EffectGeode*>(&node);