I am in a 2D scenario where I need glVertexPointer, indexed arrays and texture coordinates.
Now I specify my vertex array as GLfloat vertices[8*2]; so I have 8 vertices, each two components (x,y) and enable them
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, sizeof(GLfloat)*2, vertices);
In addition to that I specify an index list of GLuint indices[3*2*3]; I want to have triangles, two triangles form a "quad" and I want to have 3 "quads". So total amout is 18 elements.
The drawing with
glDrawElements(GL_TRIANGLES,18, GL_UNSIGNED_INT, indices);
works great, so everything is in place.
But unfortunately I struggle with texture coordinates. Is it possible to specify multiple texture coordinates per vertex? In my case I would need 3*2*3 coords, since the geometry is textured in a non-linear way. Or can I only specify as many tex coords as vertices (8) in my case?