From Wang Rui, "I've made a small fix to osgViewer/Scene.cpp, which is already attached. I would like to explain what I've done and why.
From Wang Rui, "I've made a small fix to osgViewer/Scene.cpp, which is already attached. I would like to explain what I've done and why.

In Scene::updateSceneGraph(), change:

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()));
}

to

if (getDatabasePager())
{
        // synchronize changes required by the DatabasePager thread to the scene graph
        getDatabasePager()->updateSceneGraph((*updateVisitor.getFrameStamp()));
}
if (getSceneData())
{
        updateVisitor.setImageRequestHandler(getImagePager());
        getSceneData()->accept(updateVisitor);
}

That is, just swap the positions of two 'if () {...}' segments.

While working on a paged terrain, I need to collect every newly allocated PagedLODs and make them temporarily unrenderable in the next frame, which are all done in a update callback. But I found that these PagedLODs will always be shown before collecting them, because of the unsuitable sequence in Scene::updateSceneGraph(). DatabasePager is synchronized AFTER the user updating traversal, that is, user cannot IMMEDIATELY find out changes made by DatabasePager.
 "


scrawl/osg,openscenegraph/osg,jtorresfabra/osg,scrawl/osg,marchelbling/osg,jtorresfabra/osg,marchelbling/osg,artoolkit/osg,openscenegraph/osg,artoolkit/osg,tomasthoresen/osg,tomasthoresen/osg,marchelbling/osg,artoolkit/osg,openscenegraph/osg,jtorresfabra/osg,tomasthoresen/osg,marchelbling/osg,scrawl/osg,tomasthoresen/osg,openscenegraph/osg,artoolkit/osg,jtorresfabra/osg,scrawl/osg