[osg-users] Controlling cameras with different desired frame rates

Robert Osfield robert.osfield at gmail.com
Sun Jan 6 07:35:45 PST 2008

Hi Roni,

The only way to do what you want is to have multiple viewers, be them
CompositeViewer or Viewer.  A CompositeViewer containing Viewers won't
do the trick, as the nested Viewers will just be treated as standard
Views, not as viewers in their own right.

One thing you won't be able to do is have multiple viewers sharing the
same graphics windows and have them rendering at different rates, as
its the graphics window that really sets what can be rendered at what
rate, this is down to the physical relationship between a graphics
window, and its associated logical screen and finally the pyhsical

Could you explain why you need multiple views running at different
frame rates.  Are you sharing scene graphs between these?  Are the
different views sharing graphics windows?


On Jan 6, 2008 1:52 PM, Roni Rosenzweig <roniros at gmail.com> wrote:
> Hello
> I have multiple cameras, each one needs to have a target frame rate (for
> example, 60 fps), but cameras can have different desired frame rates.
> (This will be achieved using timers and clocks).
> If all cameras had the same target rate, I could easily use CompositeViewer
> and call frame() at 60 fps, calling all cameras/views at once.
> But if every camera needs its own rate, how do I do this? A View doesn't
> have a frame() function, only Viewers do.
> I thought having a composite viewer made of Viewers instead of Views, and
> then I could call osgViewer::frame() on each frame when needed.
> Any tips?
> Roni
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list