I've written an OBJ loader which parses the vertices, texture coords, and normals, each are stored in a FloatBuffer, and passed to opengl:
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, fbVertices);
gl.glNormalPointer(GL10.GL_FLOAT, 0, fbNormals);
However I am stumped as to how i am supposed to pass my index buffer to glDrawElements, I've read that the index will refer to the index in the array for the vertices, texture, and normals, but upon reading the OBJ file description, it seems that faces are stored in a format such as this:
f 1/2/3 4/5/6 7/8/9
with the format being
vertice/texture/normal
glDrawElements only accepts 1 index, which should refer to all 3, but when i look at an actual OBJ file, this doesn't seem possible. How do you pass the index for all 3?
You can find a copy of the code here: http://codepad.org/melc1HIC