Simon Mills (simon++at++wgs.estec.esa.nl)
Fri, 26 Nov 1999 17:27:57 +0100
Well, you can just use the mediarecorder tool to capture a movie
directly from the screen. It will be rather jerky and will probably not
capture each image rendered by Performer. If that is important to you
(like it is to me) then you will have to build something into your
Performer application. This is what I have done although it is not
exactly an "easy software method".
My approach was to spawn a seperate process from the Perfomer DRAW
process to do the saving to disk while my DRAW process grabs each frame
once it is rendered by calling glReadPixels in a post-draw callback. The
image data is in shared memory and in a ring-buffer so the saving
process can do the saving in parallel to the DRAW process. I use
libimage.a to save the images as RGB's. It does slow down Performer
quite a bit but if the window size is small it's reasonable to use in
real-time. You can do it all in the DRAW process, which is much easier
to implement, but that slows down the rendering even more. I borrowed
code from pfuSaveImage to implement this.
Once you have a sequence of images, you can use moviemaker or the like
to make QuickTime movies etc.
I made it a seperate set of functions which I can now easily reuse in my
Performer applications.
BTW, another idea I once tried by never got to work was to somehow make
a DSO that overrides the glXswapbuffers call to save an image as well.
Then, just by playing with the LD_LIBRARAY_PATH to include my patched
DSO. ANY OpenGL program could be made to save images without
recompiling. Has anyone got an approach like this to work?
Hope it helps,
Simon
________________________________________________________________________
Simon C. Mills
Silicon Worlds S.A.
c/o Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
________________________________________________________________________
This archive was generated by hypermail 2.0b2 on Fri Nov 26 1999 - 08:41:38 PST