Original Post
Hi, so heres the problem: I have a model in which each vertex can have different texture coords in any of the triangles that it is part of. In other words I have my vertex positions and normals in arrays that can be rendered with indices (the data is per vertex) but the texture coords are in an array that can be rendered with the usual drawelements - the data is per vertex per triangle. Heres how I render it now:
for(int i=0;i<TriCount;i++)
{
v1=Tris.Vert[0];
v2=Tris.Vert[1];
v3=Tris.Vert[2];
glTexCoord2fv(&UV[6*i]);
glNormal3fv(&Norm[v1].x);
glVertex3fv(‖[v1].x);
glTexCoord2fv(&UV[6*i+2]);
glNormal3fv(&Norm[v2].x);
glVertex3fv(‖[v2].x);
glTexCoord2fv(&UV[6*i+4]);
glNormal3fv(&Norm[v3].x);
glVertex3fv(‖[v3].x);
}
But thats quite slow, so how should I optimise it? Is it posiible to somehow draw the normals and vertexes like with glDrawRangeElements and the texcoords like with glDrawElements at the same time?