1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

GeomMorpherController: do not dirty the MorphGeometry unless necessary

This commit is contained in:
scrawl 2015-11-22 21:19:55 +01:00
parent 0d49c7fa51
commit 38510a56c2

View file

@ -235,7 +235,12 @@ void GeomMorpherController::update(osg::NodeVisitor *nv, osg::Drawable *drawable
val = interpKey((*it)->mKeys, input); val = interpKey((*it)->mKeys, input);
val = std::max(0.f, std::min(1.f, val)); val = std::max(0.f, std::min(1.f, val));
morphGeom->setWeight(i, val); osgAnimation::MorphGeometry::MorphTarget& target = morphGeom->getMorphTarget(i);
if (target.getWeight() != val)
{
target.setWeight(val);
morphGeom->dirty();
}
} }
} }