Re: [info-performer] Questions regarding shared memory and video capture

Date view Thread view Subject view Author view

From: Benedikt Kessler (bjk++at++sgi.com)
Date: 09/09/2005 01:37:47


Hi Raymond,

pchen++at++mail.eecis.udel.edu wrote:
>
> Hey, Everybody,
> How are you all doing?
> I am now working on a surgical simulation project using Performer and
> PHANTOM device on a SGI Prism. The graphic server is runing Redhat Linux.
> My first question is for shared memory. In my simulation I built a
> pfGeoSet object for an organ model. I then used pfGeoSet::setAttr() to set
> the triangular surface meshes into the pfGeoSet. Those tiangle meshes are
> saved in an array allocated from the shared memory by pfMalloc. My
> question is, before I quit the simulation, I want to free the used shared
> memory, whats should I do?
> Should I use pfDelete() to delete the pfGeoSet object? Shoudl I use
> pfFree() to free the array containing the triangle meshes? Or should I do
> both?

The shared memory used by Performer doesn't come from the System V IPC system calls (but Performer uses System V IPC semaphores).
Thus it's gone once you quit your application. There is no need to do a pfDelete at exit.

 
> My second question is, I want to make a video of my simulation, dose
> Performer provide any video output so that I can save each frame of my
> simulation into a video file?

Copying the image from the framebuffer into memory and saving it (uncompressed to disk) takes time. If you can control the speed of your simulation (so that it behaves correct even ir run much slower) you may use pfuSaveImage to save each frame as an
individual image (if your application is pfview based you may want to derice your own module from /usr/share/Performer/src/pguide/libpfv/viewer/modules/pfvmSnapshot/pfvmSnapshot).
 
> If anyone know how to solve these problem? Please let me know.
> Thanks in advance
>
> Raymond

Bye! Benedikt

-- 
+---------------------------------+----------------------------------+
|Benedikt J. Kessler              | Silicon Graphics GmbH            |
|Advanced Media Products          | Am Hochacker 3 - Technopark      |
|SGI                              | 85630 Grasbrunn-Neukeferloh, FRG |
|    ---  __o       ,__o          |                                  |
| ------_ \<,_    _-\_<,          | Phone: (+49) 89 46108-366 or -0  |
|----- (*)/ (*)  (*)/'(*)         | Fax:   (+49) 89 46107-366        |
+---------------------------------+----------------------------------+
|E-Mail: bjk++at++sgi.com            Web (private): http://sgiweb.org/bjk |
|   Web: http://www.sgi.de                                           |
+--------------------------------------------------------------------+


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Sep 09 2005 - 01:38:26 PDT