Add manually sync of the EventQueue's startTick with the osg::Timer::startTick

This commit is contained in:
Robert Osfield
2007-01-12 14:45:10 +00:00
parent 5c78d06dad
commit 509ac7fb1a

View File

@@ -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<osgViewer::GraphicsWindow*>(*citr);
if (gw)
{
gw->getEventQueue()->setStartTick(osg::Timer::instance()->getStartTick());
}
}
}