From 3ff4fb6b50ed6c7f694223a574e7511f6fe1c478 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 15 Nov 2001 11:59:52 +0000 Subject: [PATCH] Move the call to the manipulators before the scene app traversal to that any changes to the scene graph, such as adding an app callback can be seen by during the same frame. --- src/osgGLUT/Viewer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/osgGLUT/Viewer.cpp b/src/osgGLUT/Viewer.cpp index 58cd61153..93046ca3e 100644 --- a/src/osgGLUT/Viewer.cpp +++ b/src/osgGLUT/Viewer.cpp @@ -332,10 +332,6 @@ float Viewer::app(unsigned int viewport) { osg::Timer_t beforeApp = _timer.tick(); - // do app traversal. - - getViewportSceneView(viewport)->setFrameStamp(_frameStamp.get()); - getViewportSceneView(viewport)->app(); // update the camera manipulator. osg::ref_ptr ea = new GLUTEventAdapter; @@ -346,6 +342,11 @@ float Viewer::app(unsigned int viewport) // osg::notify(osg::INFO) << "Handled update frame"<setFrameStamp(_frameStamp.get()); + getViewportSceneView(viewport)->app(); + osg::Timer_t beforeCull = _timer.tick(); return _timer.delta_m(beforeApp,beforeCull);