   How does glTexCoorPointer work with glDrawElements
  I have been looking at how to load a obj file.Managed to have the object drawn on the screen without textures.The textures part is the hard part.It seems that the number of textures does not match the number of vertex.Also the index of the vertex array does not match the index of the textures.How do I solve this using glDrawElements ??Here is an example of the faces in the OBJ file I want to load.As you can see they are all different.f 1/1/1 2/1/1 3/1/1f 4/1/2 5/1/3 6/1/4May a possible solution be to add duplicates of some textures so the array of textures match the vertex array ?Same for the normals array ??Some coding example with be nice.Thanks   
  Every array must be indexed by the same index array, there's no way around that. If you have arrays with different indices, you must rearrange the arrays. Simplest way is to just create a non-indexed array by walking the faces of the object and just put the referenced attributes into new arrays.   ;  If I remember correctly, there is a book called Focus On 3D Models by Evan Pipho that talks about the obj file format and how to load it.  You might want to take a look for it at your local book store.   