Avoid FLATTEN_STATIC_TRANSFORMS optimization for non-Geometry drawables

pull/167/head
scrawl 8 years ago
parent e4c12e5e56
commit 3df7a8c4d8

@ -392,6 +392,18 @@ namespace Resource
return reservedNames.find(name) != reservedNames.end(); return reservedNames.find(name) != reservedNames.end();
} }
virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Drawable* node,unsigned int option) const
{
if (option & SceneUtil::Optimizer::FLATTEN_STATIC_TRANSFORMS)
{
if (node->asGeometry() && node->className() == std::string("Geometry"))
return true;
else
return false; //ParticleSystem would have to convert space of all the processors, RigGeometry would have to convert bones... theoretically possible, but very complicated
}
return (option & optimizer->getPermissibleOptimizationsForObject(node))!=0;
}
virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const virtual bool isOperationPermissibleForObjectImplementation(const SceneUtil::Optimizer* optimizer, const osg::Node* node,unsigned int option) const
{ {
if (node->getNumDescriptions()>0) return false; if (node->getNumDescriptions()>0) return false;

Loading…
Cancel
Save