Hi osg-users,

I'm experiencing some problem with time management and osgViewer.

I'm under Windows Vista, OSG SVN.

I'm using a composite viewer and my rendering code is  :

pCompoViewer->advance(MyTime);
pCompoViewer->getFrameStamp()->setReferenceTime(MyTime);
pCompoViewer->getFrameStamp()->setSimulationTime(MyTime);
pCompoViewer->eventTraversal();
pCompoViewer->updateTraversal();
pCompoViewer->renderingTraversals();

instead of :

pCompoViewer->frame()

because I wand to trigger my rendering with a computed time 'MyTime" based
on a FPS I need.

But my problem is that when I use my manipulator and ea.getTime() I do not
have the same time as "MyTime" when event received is for example
osgGA::GUIEventAdapter::PUSH.
ea.getTime() is equal to MyTime only when receiving
osgGA::GUIEventAdapter::FRAME.

I tracked down this behaviour, in function
GraphicsWindowWin32::handleNativeWindowingEvent because event time is :

double eventTime  = getEventQueue()->getTime();

and getTime is returning :

osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick());

That's why It doesnt match my rendering time...

Is there any way I can resolve this problem ? (Except making my own
eventqueue class)


-- 
Alexandre AMALRIC                   Ingénieur R&D
===================================
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to