Change order of operations in SceneManager::updateCache to allow deleting of StateSets that just got unreferenced by the scene

This commit is contained in:
scrawl 2017-03-06 16:07:03 +01:00
parent eef63a880a
commit 9d72d9f0c9

View file

@ -689,13 +689,13 @@ namespace Resource
void SceneManager::updateCache(double referenceTime)
{
mSharedStateMutex.lock();
mSharedStateManager->prune();
mSharedStateMutex.unlock();
ResourceManager::updateCache(referenceTime);
mInstanceCache->removeUnreferencedObjectsInCache();
mSharedStateMutex.lock();
mSharedStateManager->prune();
mSharedStateMutex.unlock();
}
void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats)