d9c1f45231
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. " |
||
---|---|---|
.. | ||
OpenThreads | ||
osg | ||
osgAnimation | ||
osgDB | ||
osgFX | ||
osgGA | ||
osgIntrospection | ||
osgManipulator | ||
osgParticle | ||
osgPlugins | ||
osgPresentation | ||
osgShadow | ||
osgSim | ||
osgTerrain | ||
osgText | ||
osgUtil | ||
osgViewer | ||
osgVolume | ||
osgWidget | ||
osgWrappers | ||
CMakeLists.txt |