mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
optimizer: fix FlattenStaticTransformsVisitor not respecting the is permissible callback
This commit is contained in:
parent
5866f0f80b
commit
4051018862
@ -281,11 +281,11 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
|
||||
|
||||
ObjectStruct():_canBeApplied(true),_moreThanOneMatrixRequired(false) {}
|
||||
|
||||
void add(osg::Transform* transform)
|
||||
void add(osg::Transform* transform, bool canOptimize)
|
||||
{
|
||||
if (transform)
|
||||
{
|
||||
if (transform->getDataVariance()!=osg::Transform::STATIC) _moreThanOneMatrixRequired=true;
|
||||
if (!canOptimize) _moreThanOneMatrixRequired=true;
|
||||
else if (transform->getReferenceFrame()!=osg::Transform::RELATIVE_RF) _moreThanOneMatrixRequired=true;
|
||||
else
|
||||
{
|
||||
@ -322,7 +322,7 @@ class CollectLowestTransformsVisitor : public BaseOptimizerVisitor
|
||||
itr!=_currentObjectList.end();
|
||||
++itr)
|
||||
{
|
||||
_objectMap[*itr].add(transform);
|
||||
_objectMap[*itr].add(transform, transform && isOperationPermissibleForObject(transform));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user