wrvo (WRVO++at++chevron.com)
Fri, 24 Apr 1998 15:57:35 -0700
I have pseudo code as follows on how I think it should work:
float *verts = (float*) pfMalloc(sizeof(float)*ntriangle*9,arena);
pfVec4 *colors = (pfVec4*) pfMalloc(sizeof(pfVec4)*ntriangle*3,arena);
... fill in verts
...set colors to appropriate index. in my case the z value of the triangle
scaled to be between 0 and 255.
gset->setAttr(PFGS_COORD3,PFGS_PER_VERTEX,verts,0);
gset->setAttr(PFGS_COLOR4,PFGS_PER_VERTEX,colors,0);
...
gstate = new(arena) pfGeoState();
pfColortable *ctab = new(arena) pfColortable(256);
...set color values
gstate->setMode(PFSTATE_ENCOLORTABLE,PF_ON);
gstate->setAttr(PFSTATE_COLORTABLE,ctab);
gset->setGState(gstate);
geode->addGSet(gset);
...->addChild(geode);
Am I missing any overrides, of other settings somewhere else? Anyone see
anything else wrong with
the above? Does this need to be applied or something?
Thanks,
Bill Volz
=======================================================================
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:18 PDT