I have made my own nice Object class that imports .Ase files exported by 3D Studio Max 2.5 but I have a problem with Texture coordinates when using vertex arrays
exampel:
glVertexPointer(…);
glNormalPointer(…);
glTexcoordPointer(…);
glEnableclientstate(…);
glDrawElements(…);
but it doesn’t work the way I want… becouse the texture will only show on the front and the back side of my cube…
but when I do this the texture shows on all sides…
for (loop through vertex indices)
{
glBegin(Triangle)
glTexcoord(TVertexList[TFaces[i].v[0]]);
glNormal(NormalList[Faces[i].v[0]]);
glVertex(VertexList[Faces[i].v[0]]);
…
glEnd();
}
how can I use the same index list for both vertex,normals and texture coordinates?? as far as I know the texture coordinates use a different index list.