im trying to learn how to light up a triangle strip on a polygon mesh, and i cant seem to get it to work. im using the following...
void faceStrip (CGPolyMesh *m, int faceIndex, int edgeIndex)
{
int i;
CGFaceVertex *f;
RGBAColor *cptr;
// setup vertex array
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, m->V);
glBegin(GL_TRIANGLES);
for (f=m->Fv, i=0 ; i<m->noofFaces ; i++, f++)cptr = m->C + i; // i'th face colour in colour array
glColor3f(cptr->r, cptr->g, cptr->b);
glArrayElement(f->v1);
glColor3f(1.0, 1.0, 0.0);
glArrayElement(f->v2);
glColor3f(1.0, 1.0, 0.0);
glArrayElement(f->v3);
glColor3f(1.0, 1.0, 0.0);
}
glEnd();
glEnableClientState(GL_VERTEX_ARRAY);
does any one know where im going wrong?
thanx
jofoxy



