Nicolas Gauvin (nicolas++at++cae.ca)
Wed, 20 Dec 1995 13:15:55 -0500
You need to put those kind of informations into share memory when using
multiprocessing because Performer uses forked processes. If you don't, all
changes to static of global data that are made after pfConfig by the APP
process won't be seen from CULL or DRAW processes. One way to deal with this is
to use a shared arena. For example:
/* allocate shared before fork()'ing parallel processes */
Shared = (SharedData*)pfMalloc(sizeof(SharedData), pfGetSharedArena());
...
pfConfig();
Shared is a pointer to a user defined SharedData structure. Since the pointer
is initialised before pfConfig all processes get the same pointer pointing
in a shared memory section.
BTW perfly already has a share memory section called ViewState, simply add fog
and fogColor to it and so you can use ViewState->fog and ViewState->fogcolor;
--
___/ | ___/ Nicolas Gauvin e-mail: nicolas++at++cae.ca
/ / | / Software Developper voice: (514) 341-2000 x2275
/ / | __/ CAE Electronics Ltd. fax: (514) 340-5496
/ ___ | / 8585 Cote De Liesse, P.O. Box 1800
_____/ _/ _| _____/ Saint-Laurent, Quebec, Canada, H4L-4X4
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:10 PDT