Hi Chris,

The osgViewer in it's default configuration is built for realtime apps
so is focused on doing a continuous frame loop.  You aren't tied to
this, and can call viewer->frame() when you app wants, and you can
even break the viewer::frame() method out into it constituent parts
for advance(), eventTraversal(), updateTraversal() and
renderingTraversals().

Lots has been written about this in the past so please check the archives.

Robert.

On Tue, Jun 2, 2009 at 2:31 PM, Chris Denham <[email protected]> wrote:
> Background:
> In a particular durr-brain day yesterday, I was struggling to get a small
> windowed OSG app working properly.
> The problem with it was that OSG was not processing the keyboard and mouse
> events for the window hosting the OSG viewer.
> As it turns out, this was simply the result of me ONLY calling viewer->frame
> from within the paint function of the window.
> Eventually, in a flash of common sense,  I decided to also call
> viewer->frame from within a timer function running at 60Hz, and now it is
> working nicely.
>
> The Question:
> It occured to me to wonder.. "Why do I need to call 'frame' in order to
> process user events?"
> If I happen to know that my view only needs updating as a RESULT of a user
> event, how do I process the event without updating the view?
> Do I have to hammer the CPU&GPU with calls to frame while waiting for user
> input?
> In a nutshell, is it possible to get OSG to process events without calling
> frame? Or is it something I shouldn't want to do?
>
> Chris.
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to