View Full Version : Using Index vertex arrays with Tex Coords

08-06-2001, 03:12 AM
just trying to teach myself how to use indexed vertex arrays but im encountering problems assigning tex coords to each vertex when using indexes and a vertex array ...a coord is applied to each vertex...but not for each face..only the base vertices before they are run through by the indexing.

08-06-2001, 03:47 AM
i think i know where your problem is, but if you use indexed vertexarray you only get one texcoordpair (using glTexCoordPointer and enabling GL_TEXTURE_COORD_ARRAY), per vertex, so you cannot use different texcoords per face, by using glDrawElements! To get independent texcoords, you should draw like(disable texcoord_array):

per vertex in face(3 times):
1. set texcoords by yourself
2. call glArrayElement(index);

08-06-2001, 04:23 AM
that defeats the purpose of using the vertex array i think.