pfGetUserData in forked ISECT proc

New Message Reply Date view Thread view Subject view Author view

Peter Chou (peter++at++galaxy.cambridge.com)
Fri, 16 Aug 1996 11:54:48 -0400


Hi,

I have been trying to get the user-data of the hit-geode in a forked
ISECT proc with no luck.

In my program, I declared to fork ISECT proc with

   pfMultiprocess(PFMP_FORK_ISECT | PFMP_APP_CULL_DRAW);
   pfIsectFunc(MyIsectFunc);
   pfConfig();

and created user-data for geodes with

   ndData = (GEODE_DATA *)pfMalloc(sizeof(GEODE_DATA), pfGetSharedArena());
   geode = pfNewGeode();
   pfUserData(geode, ndData);

In my ISECT proc, when I found a hit geode, the code

   nbytes = pfQueryHit(*hits[0], PFQHIT_NODE, &hitNode);
   ndData = (GEODE_DATA *)pfGetUserData(hitNode);

always returned a NULL pointer for ndData; but pfGetNodeName(hitNode)
would return the correct node name of that geode.

However, if I did not fork the ISECT proc, say, declared

   pfMultiprocess(PFMP_APP_CULL_DRAW);
   pfConfig();
   pfIsectFunc(MyIsectFunc);

(yes, these three lines are the only difference)
then I could get the user-data of the hit-geode with no problem.

I have run my code on both ONYX IRIX 5.3 with Performer 2.0
and iR IRIX64 6.2 with Performer 2.1. Both gave the same results.

Is there any particular code or code ordering other than above that I
should set in order to get geode's user-data in a forked ISECT proc?
Thanks in advance for any help.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  Peter T. C. Chou
  Cambridge Research Associates, Inc. office: (703)790-0505 ext 7206
  1430 Spring Hill Road, Suite 200 FAX: (703)790-0370
  McLean, VA 22102 E-MAIL: peter++at++cambridge.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:22 PDT

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