Houston I have a problem
I’m using vertex arrays for rendering, like this :
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 0, texcoord);
glNormalPointer(GL_FLOAT, 0, normals);
glVertexPointer(3, GL_FLOAT, 0, vertices);
glDrawElements(GL_TRIANGLES, icol*3, GL_UNSIGNED_INT, vertexindicies);
The indicies of my vertices, texture coordinates and normals are in
different arrays !!!
vertexindicies[][], texcoordindicies[][] and normalindicies[][] …
So it is obvious that the texture mapping and the normals are not being
rendered correctly !
Is there any way to add the normal and texcoord indicies arrays to
glDrawElements, so that it would render everything correctly ??? Or should I
switch to interleaved arrays (if yes, how do I add indicies to interleaved
arrays?)
Thank you very very much !!!
Asshen Shugar
valheruasu@hotmail.com