Removing pfGeoStates

New Message Reply Date view Thread view Subject view Author view

Scott Herod (herod++at++evt.com)
Thu, 04 Jun 1998 12:14:06 -0600


Hello,
    I am still trying to understand a texturing problem that we are
having and was wondering if the following makes sense. We create some
objects:

  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


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:57:30 PDT

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