Hi Mathias,

If you used a FBO to capture the image then you could possible just
embed the video recording camera into the viewer, and then use the
node mask to switch it off when you don't need it.

Alternatively, if you want a fixed frame rate that is decoupled from
the main viewer then you might be forced to runa separate viewer with
its own thread running its frame loop.  You'll need a separate copy of
the scene graph for this though.  Actually this might even be best
done a separate application that you can run in the background and
just get it to watch the main apps view matrices and settings.

As part of the core OSG's viewer library there is a limit on how much
flexibility we can provide without ending up with a really convoluted
API and implementation.

Robert.

On 6/4/07, Mathias Froehlich <[EMAIL PROTECTED]> wrote:

Hi Robert,

On Friday 01 June 2007 18:05, Robert Osfield wrote:
> On 6/1/07, Emmanuel Roche <[EMAIL PROTECTED]> wrote:
> > okay, and in this case, is it possible / tested to have multiple viewers
> > on the same OpenGL Context ?...
>
> You can multiple views that share the same graphics context, but
> you'll need to use a single CompositeViewer for it to ensure that the
> threads are sycronized.
>
> You also need to realistic, frame rate is governed by the swap buffers
> of a window, when you do swap buffers all cameras drawing to that
> window have to redrawn, you can't selectively say I just want swap
> buffers on one cameras viewport on that window.

Well, I can see an application of a frame rate limit for specific contexts.

I would like to make mpeg movies from a running simulation with an existing
viewer with one or more windows.
The idea is to attach an additional pbuffer slave camera with a post render
callback that converts the resulting image to yuv and writes it into a pipe
to an external encoder program. Using an additional camera will ensure that
you are free to resize the window that is displayed and that you do not rely
on other windows not being on top of the opengl window.
Obviously it is a waste of cpu/gpu power if this is done with 60 hz. Rendering
with 30 hz - that is omitting every second frame - for that kind of slave
camera would be good.

   Greetings

            Mathias


--
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to