Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allocate empty callbacks in the RigGeometry #2252

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Do not allocate empty callbacks in the RigGeometry
  • Loading branch information
bzzt authored and akortunov committed Mar 14, 2019
commit 4ab93aeffe030993d10a5a1e4dd3cbb4bca7f152
5 changes: 3 additions & 2 deletions components/sceneutil/riggeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ RigGeometry::RigGeometry()
, mLastFrameNumber(0)
, mBoundsFirstFrame(true)
{
setUpdateCallback(new osg::Callback); // dummy to make sure getNumChildrenRequiringUpdateTraversal() is correct
// update done in accept(NodeVisitor&)
setNumChildrenRequiringUpdateTraversal(1);
// update done in accept(NodeVisitor&)
}

RigGeometry::RigGeometry(const RigGeometry &copy, const osg::CopyOp &copyop)
Expand All @@ -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)
Expand Down