Moved the updating and expiry of the Registry object cache from DatabasePager into osgViewer::Viewer/CompositeViewer.

This commit is contained in:
Robert Osfield
2009-08-05 11:06:53 +00:00
parent 2f3dfc4349
commit df9385ac19
7 changed files with 76 additions and 69 deletions

View File

@@ -77,6 +77,31 @@ void Scene::setImagePager(osgDB::ImagePager* ip)
_imagePager = ip;
}
void Scene::updateSceneGraph(osg::NodeVisitor& updateVisitor)
{
if (!_sceneData) return;
if (getSceneData())
{
updateVisitor.setImageRequestHandler(getImagePager());
getSceneData()->accept(updateVisitor);
}
if (getDatabasePager())
{
// synchronize changes required by the DatabasePager thread to the scene graph
getDatabasePager()->updateSceneGraph((*updateVisitor.getFrameStamp()));
}
if (getImagePager())
{
// synchronize changes required by the DatabasePager thread to the scene graph
getImagePager()->updateSceneGraph(*(updateVisitor.getFrameStamp()));
}
}
Scene* Scene::getScene(osg::Node* node)
{