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

0.6.1
scrawl 8 years ago
parent eef63a880a
commit 9d72d9f0c9

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

Loading…
Cancel
Save