Allocating pfVec3/pfMaterial/pfGeoState in shared memory with C++ interface

New Message Reply Date view Thread view Subject view Author view

RUS (Daniela.Rainer++at++RUS.Uni-Stuttgart.DE)
Wed, 15 Jul 1998 18:24:26 +0000


Hi,

currently we are porting our application from the Performer C API to the C++
API. We wonder how to allocate coordinates/colors/normals/materials in shared
memory. The man pages for example for pfVec3 say:

"new allocates a pfVec3 from the default memory arena (-pfGetSharedArena)."
allocates memory from shared arena.

In the perfly C++ example code you find

  coords = (pfVec3*)pfCalloc(4, sizeof(pfVec3), arena);
Why do you use the C API here? Why not coords=new pfVec4(4, arena)?

   mtl = new pfMaterial();
Does this allocate mtl in the default shared arena?

  pfGeoState *gs = new (pfGetSharedArena()) pfGeoState;
Why not pfGeoState *gs = new pfGeoState;

Thanks for any help.

Best Regards
Daniela

-- 
-------------------------------------------------------------------------
Daniela Rainer                       | email: rainer++at++hlrs.de
Rechenzentrum Uni Stuttgart (RUS)    | http://www.hlrs.de/people/rainer/
Allmandring 30a, 70550 Stuttgart     | Tel:   +49 (0) 711 685 5837
GERMANY                              | Fax:   +49 (0) 711 682 357
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:42 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.