From 509ac7fb1ac2333ff2b323dd5ced400da0f0c3a5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 12 Jan 2007 14:45:10 +0000 Subject: [PATCH] Add manually sync of the EventQueue's startTick with the osg::Timer::startTick --- src/osgViewer/Viewer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index ebcc5f8a8..33695ac6a 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -541,6 +541,18 @@ void Viewer::realize() // initialize the global timer to be relative to the current time. osg::Timer::instance()->setStartTick(); + + getEventQueue()->setStartTick(osg::Timer::instance()->getStartTick());; + for(Contexts::iterator citr = contexts.begin(); + citr != contexts.end(); + ++citr) + { + osgViewer::GraphicsWindow* gw = dynamic_cast(*citr); + if (gw) + { + gw->getEventQueue()->setStartTick(osg::Timer::instance()->getStartTick()); + } + } }