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.
This commit is contained in:
parent
4b3c45acc7
commit
3ff4fb6b50
@ -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<GLUTEventAdapter> ea = new GLUTEventAdapter;
|
||||
@ -346,6 +342,11 @@ float Viewer::app(unsigned int viewport)
|
||||
// osg::notify(osg::INFO) << "Handled update frame"<<endl;
|
||||
}
|
||||
|
||||
// do app traversal.
|
||||
|
||||
getViewportSceneView(viewport)->setFrameStamp(_frameStamp.get());
|
||||
getViewportSceneView(viewport)->app();
|
||||
|
||||
osg::Timer_t beforeCull = _timer.tick();
|
||||
|
||||
return _timer.delta_m(beforeApp,beforeCull);
|
||||
|
Loading…
Reference in New Issue
Block a user