From 5a515914bccd29b0a1575a375d788396cccf876f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 12 Jan 2007 19:09:24 +0000 Subject: [PATCH] Moved the signalBeginFrame to the start of the rendering traversal. --- src/osgViewer/SimpleViewer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/osgViewer/SimpleViewer.cpp b/src/osgViewer/SimpleViewer.cpp index 35a07ea1b..bd52d3278 100644 --- a/src/osgViewer/SimpleViewer.cpp +++ b/src/osgViewer/SimpleViewer.cpp @@ -234,9 +234,6 @@ void SimpleViewer::updateTraversal() if (_databasePager.valid()) { - // tell the DatabasePager the frame number of that the scene graph is being actively used to render a frame - _databasePager->signalBeginFrame(_frameStamp.get()); - // syncronize changes required by the DatabasePager thread to the scene graph _databasePager->updateSceneGraph(_frameStamp->getReferenceTime()); } @@ -246,6 +243,12 @@ void SimpleViewer::updateTraversal() void SimpleViewer::renderingTraversal() { + if (_databasePager.valid()) + { + // tell the DatabasePager the frame number of that the scene graph is being actively used to render a frame + _databasePager->signalBeginFrame(_frameStamp.get()); + } + _sceneView->cull(); _sceneView->draw();