Scott Herod (herod++at++evt.com)
Thu, 04 Jun 1998 12:14:06 -0600
data->geoset = new pfGeoSet;
data->geostate = new pfGeoState;
data->tex = new pfTexture;
data->texenv = new pfTexEnv;
attach them to each other appropriately:
data->geoset->setGState(data->geostate);
data->geostate->setAttr( PFSTATE_TEXTURE, data->tex );
data->geostate->setAttr(PFSTATE_TEXENV, data->texenv);
make a node for them:
data->geode = new pfGeode;
data->geode->addGSet(data->geoset);
and add them to a DCS:
data->dcs = new pfDCS;
data->dcs->addChild(data->geode);
(I've left out various lines.)
At delete time, I need to remove everything but I'm finding that I
cannot pfDelete the GeoState even if the GeoSet has been deleted
because the reference count for the GeoState still includes its use
in the GeoSet. Thus,
data->geoset->setGState(NULL);
is required prior to
pfDelete(dataxs->geostate);
Similarly, the Texture and TexEnv require
data->geostate->setAttr(PFSTATE_TEXTURE, NULL);
data->geostate->setAttr(PFSTATE_TEXENV, NULL);
before they can be deleted even if the GeoState has successfully been
deleted. Is my understanding correct?
Thank you,
Scott Herod
herod++at++evt.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
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:30 PDT