Re: pfAllocChanData

New Message Reply Date view Thread view Subject view Author view

Lance R. Marrou (marrou++at++vsl.ist.ucf.edu)
Tue, 11 Oct 1994 13:52:51 +0500


On Tue, 11 Oct 1994, Angus Henderson wrote:

> I have an APP_CULL_DRAW with 3 channels on 1 pipe.
> I have 1000 fish which swim arround the APP and want their positions
> passed to the DRAW
...
> That is easy and it works, but I have three channels. Each seems to need
> a personal "pfAllocChanData". However I only have one FishPass data
> structure which is re-calculated once each pass after pfFrame in APP.

While I do not have the answer to use pfAllocChanData, I do have a comment
and another solution. First, here is an excerpt from the man page:

     For best performance, channel buffers allocated by pfAllocChanData should
     be as small as possible and pfPassChanData should be called only when
     necessary to reduce copying overhead.

It sounds as if your passdata structure may be a little large. Why not
hold the fish information in shared memory instead? If you allocate this
shared memory correctly and all the channels just need to read it, everything
should work well (and probably faster, too).

_______________________________________________________
IST __ E-mail: marrou++at++vsl.ist.ucf.edu
Visual / / ______ /\____ ______ ______
Systems / / / _ / / __ // ____// ____/
Lab / /__ / /_/ / / / / // /___ / __/_ R. Marrou
________/____//____/\\/_/ /_//_____//_____/____________


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:50:35 PDT

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