Garrett Williams (gwilliams++at++etcflorida.com)
Mon, 06 Oct 1997 08:34:03 -0700
could someone please describe in DETAIL what it takes to texture an
object and what each peace does..
this is what I have and understand so far..
// load texture
tex = new pfTexture;
tex->loadFile("fire.rgb");
// enable texturing
pfGeoState *gstate1 = new pfGeoState;
gstate1->setMode(PFSTATE_ENTEXTURE,1);
// set coord's for texture ???? need further explanation
pfVec2 *tcoords = new pfVec2[4];
tcoords[0].set(0.0f, 0.0f);
tcoords[1].set(1.0f, 0.0f);
tcoords[2].set(1.0f, 1.0f);
tcoords[3].set(0.0f, 1.0f);
// this creates a face when used by polygons I am not too shure what it
// does here
ushort *tindex = new ushort[8];
tindex[0] = 0; tindex[1] = 1; tindex[2] = 2; tindex[3] =0;
tindex[4] = 1; tindex[5] = 2; tindex[6] = 2; tindex[7] =3;
// do texturing
gset1->setAttr(PFGS_TEXCOORD2, PFGS_PER_VERTEX,
coords1,NULL);//PFGS_PER_VERTEXgstate1->setAttr(PFSTATE_TEXTURE,tex);
I know that I am close I just need the details.....
thanks mucho
=======================================================================
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:56:03 PDT