Re: thanks to Re: pfGsetAttr but not solving any pb.

New Message Reply Date view Thread view Subject view Author view

Michael Philip (mphilip++at++technet.sg)
Thu, 8 Aug 1996 03:27:28 -0700


At 14:44 3/08/96 +0200, you wrote:
>Or do you know a safe (and fast) way of modifying the number of primitives
>of a pfGeoSet between two frames?

If I understand the question correctly, the problem is that you can
easily use pfCycleBuffers for the attribute lists of dynamic objects,
but if one of the things you would like to animate is the actual number
of primitives (pfGSetNumPrims), there is no function to synchronize
this with the pfCycleBuffer'd lists.

To get around this problem, I use a ring buffer of frame stamped
"update requests" in shared memory. I queue an "update request"
for the pfGSetNumPrims for a pfGeoSet when I change its
pfCycleBuffer data. Then, in the draw-process callback function,
I process the appropriate update requests for the current frame
before pfDraw()'ing it.

The "update request" is just the framestamp (pfGetFrameStamp()
called from APP), a pointer to the pfGeoSet (in shared memory)
and the requested numPrims value.

I also use this method to swap pfGeoSet attribute lists and bind
textures for dynamic objects at a specific frame.

Hope this helps.

Good luck,

Mike Philip

--
Michael Philip    Symbolic Research Pte Ltd     Singapore
Phone:+65-9615-9181  Fax:+65-285-5311  mphilip++at++netcom.com

======================================================================= 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:53:19 PDT

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