Reading my obj file, and only taking into account the vertices and the indices thereof, my object renders the required object as far as vertices are concerned; for now I'm using just a basic color array so I can ascertain my loader works. What I realized is that OpenGL wasn't drawing my object correctly before because the uv indices were being read with the vertex indices - I read all the indices from a line say:
f 2/3/4 3/6/1 1/3/6
Into one vector which I then passed to GL_ELEMENT_ARRAY_BUFFER. Unfortunately OpenGL (nor DirectX) allow more than one index buffer. So, that means I can't have a separate vector which only holds uv indices, with another holding vertex indices; or another holding the normal indices. With only having one index buffer, and therefore only one vector which holds the indices for vertices, textures and normals; how can I instruct OpenGL to draw the primitive prescribed in the obj file without omitting one index in favor of another?
Note: I'm drawing the primitive using glDrawElements(..); I have used glDrawArrays(..) in the past but this time I want to use the former method for efficiency.