mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:59:54 +00:00
Avoid FLATTEN_STATIC_TRANSFORMS optimization for non-Geometry drawables
This commit is contained in:
parent
e4c12e5e56
commit
3df7a8c4d8
1 changed files with 12 additions and 0 deletions
|
@ -392,6 +392,18 @@ namespace Resource
|
|||
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
|
||||
{
|
||||
if (node->getNumDescriptions()>0) return false;
|
||||
|
|
Loading…
Reference in a new issue