1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 16:39:41 +00:00

Merge pull request #2252 from akortunov/terrain

Do not allocate empty callbacks in the RigGeometry
This commit is contained in:
Bret Curtis 2019-03-14 14:53:35 +01:00 committed by GitHub
commit 7917f1fc84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ RigGeometry::RigGeometry()
, mLastFrameNumber(0)
, mBoundsFirstFrame(true)
{
setUpdateCallback(new osg::Callback); // dummy to make sure getNumChildrenRequiringUpdateTraversal() is correct
setNumChildrenRequiringUpdateTraversal(1);
// update done in accept(NodeVisitor&)
}
@ -54,6 +54,7 @@ RigGeometry::RigGeometry(const RigGeometry &copy, const osg::CopyOp &copyop)
, mBoundsFirstFrame(true)
{
setSourceGeometry(copy.mSourceGeometry);
setNumChildrenRequiringUpdateTraversal(1);
}
void RigGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeometry)