Garrett Williams (gwilliams++at++etcflorida.com)
Tue, 07 Oct 1997 13:57:53 -0700
I only recived one reply to my last question. Thanks for the reply BUT
I need help with PERFORMER I am not using opengl directly.
I have not found any information on texturing except for the man pages
and the demo code only textures PFGS_QUADS which I now understand
slightly. I wish to texture many PFGS_TRIS with a repeating texture.
what I have done so far is a non continous pattern changing at every
poly.
NOW this is what I have and understand so far..
it works on PFGS_QUADS fine but is not continous on PFGS_TRIS...
// 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 for use with
PFGS_TRIS
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);
// order of the coords to place the texture ? need further explanation
for use with PFGS_TRIS
ushort *tindex = new ushort[8];
tindex[0] = 0; tindex[1] = 1; tindex[2] = 2; tindex[3] =3;
tindex[4] = 0; tindex[5] = 1; tindex[6] = 2; tindex[7] =3;
// do texturing
gset1->setAttr(PFGS_TEXCOORD2, PFGS_PER_VERTEX,coords1,tindex);
gstate1->setAttr(PFSTATE_TEXTURE,tex);
Thanks to all that send help..
garrett
=======================================================================
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:04 PDT