From e692e7c119c67662f63fec7c3761baf7d4b4cef1 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sat, 19 May 2012 19:39:38 +0200 Subject: [PATCH] Hack to avoid redrawing the whole scene another time when only light volume are requested --- simgear/scene/material/EffectCullVisitor.cxx | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5