From: Frederic Bouvier Date: Sat, 19 May 2012 17:39:38 +0000 (+0200) Subject: Hack to avoid redrawing the whole scene another time when only light volume are requested X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e692e7c119c67662f63fec7c3761baf7d4b4cef1;p=simgear.git Hack to avoid redrawing the whole scene another time when only light volume are requested --- diff --git a/simgear/scene/material/EffectCullVisitor.cxx b/simgear/scene/material/EffectCullVisitor.cxx index 4f84552e..4559ee0b 100644 --- a/simgear/scene/material/EffectCullVisitor.cxx +++ b/simgear/scene/material/EffectCullVisitor.cxx @@ -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(&node);