Hi André, I think the problem is, if you do nothing with your window, handleNativeWindowingEvent() gets no events, causing _timeOfLastCheckEvents getting no updates, until you move your mouse again. Then you will get an "event from the past", i.e. with the old _timeOfLastCheckEvents instead of a fresh getEventQueue()->getTime(). If you keep your mouse moving everything is fine.
Tim. -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau Gesendet: Dienstag, 10. Juli 2007 18:28 An: 'osg users' Betreff: RE: [osg-users] Events from the past Hi Tim, Correction: the getEventQueue()->getTime() method returns a time based on the timer, not the time set by the last EventQueue::frame() call, so my "two-frames behind" comment below is not valid. Sorry for the noise. André -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of André Garneau Sent: July-10-07 12:18 PM To: 'osg users' Subject: RE: [osg-users] Events from the past Hi Tim, Looking at the code, the EventsQueue::frame() method is called *after* the events are extracted from the graphics windows. So the event time appears to be two frames behind. It might be better therefore to use the current event time (i.e. getEventQueue()->getTime()) instead of the previous one, since the positioning of the EventsQueue::frame() call (which sets the new event time) is already after the checkEvents() call. Hoping the above does not sound too confusing... :-) As a test you could therefore try out this change: Replace (in GraphicsWindowWin32::handleNativeWindowingEvent() ) ------- double baseTime = _timeLastCheckEvents; double eventTime = _timeLastCheckEvents; double resizeTime = eventTime; _timeOfLastCheckEvents = getEventQueue()->getTime(); By -- _timeOfLastCheckEvents = getEventQueue()->getTime(); double baseTime = _timeLastCheckEvents; double eventTime = _timeLastCheckEvents; double resizeTime = eventTime; And see how you get on. Perhaps Robert can confirm or deny this. Hope this helps, André -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: July-10-07 10:06 AM To: osg-users@openscenegraph.net Subject: Re: [osg-users] Events from the past Hi André, the manipulator jumps forward everytime I move the mouse. It is a typical manipulator, saving the last two GUIEventAdapters for calculating the dT. Looking at a short recording of the views->EventQueue: time: 8.949542 type: Frame time: 8.833379 type: Mouse, time: 8.966164 type: Frame you can see the first pair gives a negative dT, the second pair a relative large dT of about 0.13, causing the manipulator to "run like hell"... Tim. -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von André Garneau Gesendet: Dienstag, 10. Juli 2007 15:43 An: 'osg users' Betreff: RE: [osg-users] Events from the past Hi Tim, You are right, the event time used to tag the time at which windowing events occurred is the time of the last check events. In reality, these events occurred in the time range [_timeOfLastCheckEvents, getEventQueue()->getTime()], so this is a valid time, albeit conservatively lagging behind. If we were to use the eventTime instead, that would also be a valid time, but this time possibly ahead of the real event time, so there is no perfect pick. What kind of problem is that causing in your manipulator ? André -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: July-10-07 5:50 AM To: osg-users@openscenegraph.net Subject: [osg-users] Events from the past Hi, I have some problems with my flightManipulator. Looking closer, the mouse events seem to be much older than the following frame event. After digging in the OSG source I found that the GraphicsWindowWin32 uses eventTime = _timeOfLastCheckEvents; instead of something like eventTime = getEventQueue()->getTime(); Thanks for any answers/help/indoctrinations... Tim. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/