1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-29 09:15:35 +00:00

Early out for scene graphs with no update callbacks in SceneManager::notifyAttached

This commit is contained in:
scrawl 2017-02-04 01:22:43 +01:00
parent 83a9435167
commit c95868969b

View file

@ -477,10 +477,14 @@ namespace Resource
} }
void SceneManager::notifyAttached(osg::Node *node) const void SceneManager::notifyAttached(osg::Node *node) const
{
// we can skip any scene graphs without update callbacks since we know that particle emitters will have an update callback set
if (node->getNumChildrenRequiringUpdateTraversal() > 0)
{ {
InitWorldSpaceParticlesVisitor visitor (mParticleSystemMask); InitWorldSpaceParticlesVisitor visitor (mParticleSystemMask);
node->accept(visitor); node->accept(visitor);
} }
}
Resource::ImageManager* SceneManager::getImageManager() Resource::ImageManager* SceneManager::getImageManager()
{ {