Hey guys

I've run into a problem here. I'm trying to load an *.obj file. So far I've managed to load the geometry itsself (vertices + faces). I'm having issues with the texture-coordinates.

The faces look like this in the file:
f 15/1 14/2 18/3
f 18/4 19/5 15/6
f 16/7 15/8 19/9
f 19/10 20/11 16/12
f 14/13 13/14 17/15
f 17/16 18/17 14/18
Each face consists of 3 vertices (separated by spaces). Each vertex has a "vertex index" and a "uv coordinate index". If you also have normals, you will have a third index into the normal-array.

All these indices kinda suprise me and make my life hard. I expected only one index that points into all arrays at the same time. It's quite easy to get the right (vertex, UV, normal) triplet for each vertex. Now I need to resolve these arrays myself.

I thought that because the UV-indices seem te be increasing, I could cheat and just load the entire array directly. I found out that this is not good, because vertex 15 actually corresponds to UV coordinate 1, while UV coordinate 15 is used.

So, How can I resolve the normal and UV-coordinate arrays? What if I encounter 15/1 and 15/2? The 15th vertex can only be coupled with either UV 1 or UV 2.

Thanks a bunch!