Re: Problems Passing Channel Data

New Message Reply Date view Thread view Subject view Author view

Allan Schaffer (allan++at++cthulhu.engr.sgi.com)
Thu, 9 Sep 1999 09:58:18 -0700 (PDT)


On Sep 9, 10:31am, Russell Suter wrote:
> I'm trying to pass data to my Draw Process and I'm using pfPassChanData
> to do it. It seems like a nice interface to get data to the
> DrawCallBack.
> The problem I'm having is that it appears that the data is not being
> copied on the first call to pfFrame.

I believe this is correct behavior for PFMP_APP_CULL_DRAW mode.
The data is copied in a frame-accurate 'waterfall' manner, meaning
that the first call to pfFrame() will copy the data from APP to CULL,
the second call will copy the next frame's data from APP to CULL and
the first frame's from CULL to DRAW, etc. I've commonly seen folks
put:

   static int firstcall=1;
   if (firstcall)
   {
        firstcall=0;
        // skip-passthru-data-processing-for-this-frame;
   }
   else
   {
        // real draw callback stuff
   }

..in their draw callback for this reason.

Hope this helps.
Allan

-- 
Allan Schaffer                                            allan++at++sgi.com
Silicon Graphics                           http://reality.sgi.com/allan

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Sep 09 1999 - 09:58:39 PDT

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