Hi Robert,
I see, that makes sense. In my example, I just have, in effect, a simple scene editor. So process the event, then update the view is all I need in this case. Just for info: I'm running the osgviewer attached to the hWnd of a WinForms Panel in a .NET app. So I guess the events are getting into OSG via the replacement WndProc that OSG assigns to Panel window handle.
Chris.

----- Original Message ----- From: "Robert Osfield" <[email protected]>
To: "Chris Denham" <[email protected]>
Sent: Tuesday, June 02, 2009 5:18 PM
Subject: Re: [osg-users] Processing input events without calling Viewer::frame?


Hi Chris,

On Tue, Jun 2, 2009 at 5:07 PM, Chris Denham <[email protected]> wrote:
I think the thing that still puzzles me though is this:
Why can't an event be processed on receipt of the event instead of putting
it in a queue for processing at the next event traversal?

The OSG isn't event driven by default, it's frame driven.  In
real-time apps and games you absolutely don't want ever to be event
driven, it would totally mess up getting a consistent frame rate.

Instead the OSG polls for events, and this polling is done in
Viewer::eventTraversal().  However, if you are using an event driven
apps such as one based on Qt etc. then it'll be pushing the events to
the viewer.  it does sound like you are using the OSG's inbuilt event
support though...

Robert.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to