From 41769f202c50c9b934d501176520e4ac06da3817 Mon Sep 17 00:00:00 2001 From: Jason Hooks Date: Fri, 13 Jan 2012 00:48:52 -0500 Subject: [PATCH] Huge Performance Increase --- apps/openmw/mwrender/animation.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 5105d12b4..fbe30bbb0 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -457,12 +457,12 @@ namespace MWRender{ Ogre::Bone* b = skel->getRootBone(); b->setOrientation(Ogre::Real(.3),Ogre::Real(.3),Ogre::Real(.3), Ogre::Real(.3)); //This is a trick - skel->getManualBonesDirty(); + skel->_updateTransforms(); - skel->_notifyManualBonesDirty(); + //skel->_notifyManualBonesDirty(); base->getAllAnimationStates()->_notifyDirty(); - base->_updateAnimation(); + //base->_updateAnimation(); base->_notifyMoved(); for(unsigned int i = 0; i < entityparts.size(); i++){ @@ -470,12 +470,12 @@ namespace MWRender{ Ogre::Bone* b = skel->getRootBone(); b->setOrientation(Ogre::Real(.3),Ogre::Real(.3),Ogre::Real(.3), Ogre::Real(.3));//This is a trick - skel->getManualBonesDirty(); + skel->_updateTransforms(); - skel->_notifyManualBonesDirty(); + // skel->_notifyManualBonesDirty(); entityparts[i]->getAllAnimationStates()->_notifyDirty(); - entityparts[i]->_updateAnimation(); + //entityparts[i]->_updateAnimation(); entityparts[i]->_notifyMoved(); } @@ -535,11 +535,11 @@ namespace MWRender{ bone->setOrientation(r); - skel->getManualBonesDirty(); + skel->_updateTransforms(); - skel->_notifyManualBonesDirty(); + //skel->_notifyManualBonesDirty(); base->getAllAnimationStates()->_notifyDirty(); - base->_updateAnimation(); + //base->_updateAnimation(); base->_notifyMoved(); } for(int i = 0; i < entityparts.size(); i++){ @@ -550,11 +550,11 @@ namespace MWRender{ bone->setPosition(t); if(bQuats) bone->setOrientation(r); - skel->getManualBonesDirty(); + skel->_updateTransforms(); - skel->_notifyManualBonesDirty(); + //skel->_notifyManualBonesDirty(); entityparts[i]->getAllAnimationStates()->_notifyDirty(); - entityparts[i]->_updateAnimation(); + // entityparts[i]->_updateAnimation(); entityparts[i]->_notifyMoved(); } }