From 7e8fb16507072076855b7a9de4eb4a4d80249e78 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Mon, 11 Jun 2012 09:12:47 +0200 Subject: [PATCH] Static or shared objects are not light volumes (but can include some) --- simgear/scene/tgdb/ReaderWriterSTG.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index 44a2296f..5b58262b 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -239,7 +240,10 @@ ReaderWriterSTG::readStgFile(const std::string& absoluteFileName, std::string absName = osgDB::findDataFile(name, opt.get()); proxyNode->setFileName(0, absName); if (SGPath(absName).lower_extension() == "ac") + { + proxyNode->setNodeMask( ~simgear::MODELLIGHT_BIT ); opt->setInstantiateEffects(true); + } else opt->setInstantiateEffects(false); proxyNode->setDatabaseOptions(opt.get()); @@ -261,6 +265,8 @@ ReaderWriterSTG::readStgFile(const std::string& absoluteFileName, else opt->setInstantiateEffects(false); node = osgDB::readRefNodeFile(absName, opt.get()); + if (SGPath(absName).lower_extension() == "ac") + node->setNodeMask( ~simgear::MODELLIGHT_BIT ); if (!node.valid()) { SG_LOG( SG_TERRAIN, SG_ALERT, absoluteFileName -- 2.39.5