Bob Kuehne wrote:
> in fact, what paul says is very similar to what i often do in test apps:
> 
> while ( !viewer.done() )
> {
>       usleep( timeToSleepToGetMeToMyDesiredFrameRate );
>       viewer.frame();
> }
> 
> in a more commercial-style app, i'd recommend only redrawing when data  
> actually
> changes. so in a cad app, when the user moves the mouse, or edits the  
> data, in a
> flight sim, when the eyepoint, or any on-screen data changes, etc.

yes, I also think this is the good approach - only draw something if
something has changed.

but for the viewer, I'd need to know if there was any user input (like a
mouse operation for zooming in/out), that is handled by the viewer
itself. is there a way to catch this event? I imagine something like the
following:

while (!viewer.done()) {
    blockUntilTheresChange();
    viewer.frame();
}


is there something to this end in viewer?


Akos

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to