Moved the updating and expiry of the Registry object cache from DatabasePager into osgViewer::Viewer/CompositeViewer.
This commit is contained in:
@@ -924,29 +924,22 @@ void Viewer::updateTraversal()
|
||||
_updateVisitor->setFrameStamp(getFrameStamp());
|
||||
_updateVisitor->setTraversalNumber(getFrameStamp()->getFrameNumber());
|
||||
|
||||
if (getSceneData())
|
||||
{
|
||||
_updateVisitor->setImageRequestHandler(_scene->getImagePager());
|
||||
getSceneData()->accept(*_updateVisitor);
|
||||
}
|
||||
|
||||
if (_scene->getDatabasePager())
|
||||
{
|
||||
// synchronize changes required by the DatabasePager thread to the scene graph
|
||||
_scene->getDatabasePager()->updateSceneGraph(*_frameStamp);
|
||||
}
|
||||
_scene->updateSceneGraph(*_updateVisitor);
|
||||
|
||||
// if we have a shared state manager prune any unused entries
|
||||
if (osgDB::Registry::instance()->getSharedStateManager())
|
||||
osgDB::Registry::instance()->getSharedStateManager()->prune();
|
||||
|
||||
// update the Registry object cache.
|
||||
osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp());
|
||||
osgDB::Registry::instance()->removeExpiredObjectsInCache(*getFrameStamp());
|
||||
|
||||
if (_scene->getImagePager())
|
||||
{
|
||||
// synchronize changes required by the DatabasePager thread to the scene graph
|
||||
_scene->getImagePager()->updateSceneGraph(*_frameStamp);
|
||||
}
|
||||
|
||||
if (_updateOperations.valid())
|
||||
{
|
||||
_updateOperations->runOperations(this);
|
||||
}
|
||||
|
||||
|
||||
if (_incrementalCompileOperation.valid())
|
||||
{
|
||||
// merge subgraphs that have been compiled by the incremental compiler operation.
|
||||
|
||||
Reference in New Issue
Block a user