Moved the scene related requiresUpdateSceneGraph() implementation details from View into Scene.
Added check against the ImagePager.
This commit is contained in:
@@ -19,7 +19,7 @@ using namespace osgViewer;
|
||||
|
||||
namespace osgViewer
|
||||
{
|
||||
|
||||
|
||||
|
||||
struct SceneSingleton
|
||||
{
|
||||
@@ -113,6 +113,20 @@ void Scene::setImagePager(osgDB::ImagePager* ip)
|
||||
_imagePager = ip;
|
||||
}
|
||||
|
||||
bool Scene::requiresUpdateSceneGraph() const
|
||||
{
|
||||
// check if the database pager needs to update the scene
|
||||
if (getDatabasePager()->requiresUpdateSceneGraph() || getDatabasePager()->getRequestsInProgress()) return true;
|
||||
|
||||
// check if the image pager needs to update the scene
|
||||
if (getImagePager()->requiresUpdateSceneGraph()) return true;
|
||||
|
||||
// check if scene graph needs update traversal
|
||||
if (_sceneData.valid() && (_sceneData->getUpdateCallback() || (_sceneData->getNumChildrenRequiringUpdateTraversal()>0))) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Scene::updateSceneGraph(osg::NodeVisitor& updateVisitor)
|
||||
{
|
||||
if (!_sceneData) return;
|
||||
|
||||
Reference in New Issue
Block a user