Hi Nicolas,

For future posts could you break you posts into several paragraphs so
the various questions and points are easier to spot and follow, this
will make it easier to read and answer without getting
misunderstandings.

I think the question are asking is how to do a viewer with different
views running at different frame rates.  CompositeViewer doesn't
support this, all the Views are synchronized to have the same
FrameStamp.  This is done for practicability as relaxing things so
that all views could have different frame rates would really
complicate the code internally as well as the public interface.  There
are also issues like the fact that all cameras on a graphics window
have to be update all at the same time thanks to the way that double
buffering works, this put constraints on the views that share a single
window needing to update at the same time, keeping the CompositeViewer
so it only has one frame stamp, and one frame loop fits this
constraint automatically as well as keeping the internals and API
clean.

If you want two views with separate windows running at a different
frame rate with their own frame loops then you'll need use two
separate viewers.

Robert.

On Feb 18, 2008 10:00 AM, nicolas peña <[EMAIL PROTECTED]> wrote:
> Hello, I work in a Spanish research group that mainly works on mobile
> robotics and I am going to use OSG 2.2 to build an application (simulator of
> multi-robot collaborative perception) that has a main view that the user
> interact with, and a dynamic number of secondary views (one camera each)
> that render to a file, usually much lower frame rate that the main view, to
> simulate virtual cameras whose images are the used to feed the algorithms
> of collaborative  perception. I  am quite new to OSG, and after learning a
> bit I think that may at way to achieve this is using a composite viewer with
> a view as the main one and adding others with their respective camera set to
> render to a off screen pixel buffer, images attached to these cameras and
> post draw callbacks that send a copy of these images where they are needed.
> Many questions have arisen, to start with  is the approach of using  a
> composite viewer wrong?, how can I achieve  different frame rates with the
> different views?. I had the idea of modifying  the "renderingTraversals()"
> method of the viewer base class in order to accept as a parameter a
> std::vector<int> that contained the indexes of the desired cameras to render
> in the internal  vector that holds all the cameras, but with the threading
> model that its in use (really nice actually) this is just not that simple.
> Can any one help me with ideas on how to achieve my goal? Thanks a lot in
> advance!.
>
> Nicolas,
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to