Wavefront faces and WebGL textures
I've been coding .obj-loader for WebGL and I've managed to get all the data from the file to my own arrays. My problem is with the texture coordinates. The faces in the object are v/vt/vn (Atm I'm ignoring the normals) and I'm kinda confused about how the vt-part works.
I import the faces' v-data to my index buffer and then I try to create a texture buffer array using the v/vt information, so I have matching texture and vertex indices. But the faces' v-index can have multiple different vt-info attached to it so how am I supposed to use the faces' vt-data? I mean there can be faces like 50/100/20, 50/123/25 and so on.
When I parse the .obj-file, I get the vertices to vertex array, vertex textures to texture array and the faces v-data to index array. After that I create new texture array and fill it with data from texture array using faces' vt-indices.