diff --git a/include/osgUtil/Optimizer b/include/osgUtil/Optimizer index cab8a0578..709401360 100644 --- a/include/osgUtil/Optimizer +++ b/include/osgUtil/Optimizer @@ -262,6 +262,7 @@ class OSGUTIL_EXPORT Optimizer virtual void apply(osg::Geode& geode); virtual void apply(osg::Billboard& geode); virtual void apply(osg::ProxyNode& node); + virtual void apply(osg::PagedLOD& node); virtual void apply(osg::Transform& transform); bool removeTransforms(osg::Node* nodeWeCannotRemove); diff --git a/src/osgUtil/Optimizer.cpp b/src/osgUtil/Optimizer.cpp index 76e3d2c92..b1a9952c5 100644 --- a/src/osgUtil/Optimizer.cpp +++ b/src/osgUtil/Optimizer.cpp @@ -758,6 +758,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor // disable if object is a light point node. if (strcmp(node->className(),"LightPointNode")==0) return false; if (dynamic_cast(node)) return false; + if (dynamic_cast(node)) return false; return BaseOptimizerVisitor::isOperationPermissibleForObject(node); } @@ -1096,6 +1097,13 @@ void Optimizer::FlattenStaticTransformsVisitor::apply(osg::ProxyNode& node) traverse(node); } +void Optimizer::FlattenStaticTransformsVisitor::apply(osg::PagedLOD& node) +{ + _excludedNodeSet.insert(&node); + + traverse(node); +} + void Optimizer::FlattenStaticTransformsVisitor::apply(osg::Geode& geode) { @@ -1173,6 +1181,7 @@ bool Optimizer::FlattenStaticTransformsVisitor::removeTransforms(osg::Node* node titr!=_transformSet.end(); ++titr) { + osg::notify(osg::NOTICE)<<"Disabling transform"<