Nicolas Gauvin (nicolas++at++cae.ca)
Wed, 2 Oct 1996 16:33:43 -0400
>This is a bug in Performer 2.1 and 2.0.2 where user data attached to a pfNode
>is not copied to the ISECT process. There is a workaround for this problem
>(thanks to Jenny Zhao at SGI).
>
>The fix is to call pfFrame prior to attaching your user data or you can (from
>the APP process) traverse your scene graph and reattach your user data before
>starting your sim-loop. The following code snippet fixes the problem....
>
>void fixUserData(pfNode *node)
>{
> void *ud = NULL;
> int numKids = 0;
> int i;
>
> if (node == NULL) return;
>
> ud = pfGetUserData(node);
> if (ud) pfUserData(node, ud);
>
> if (pfIsOfType(node, pfGetGroupClassType())) {
> numKids = pfGetNumChildren(node);
> for (i=0; i<numKids; i++)
> fixUserData(pfGetChild(node, i));
> }
>}
>
>main()
>{
> ...
> pfScene *scene = LoadScene();
>
> pfFrame();
>
> fixUserData((pfNode *)scene);
>
> while (1) {
> ...
> }
>}
--
Nicolas Gauvin CAE Electronics Ltd., 8585 Cote De Liesse
Software Developer Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications tel: +1 514 341 2000 extension 2275
nicolas++at++cae.ca fax: +1 514 340 5496
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:42 PDT