Im trying to draw a globe in Android, I use OpenGL for this. However to make it easier to understand i will start by making a simple 3D cube. I use Blender to create my 3D object (cube) and export it as a .obj file after i have unwrapped it to get Texture Coords (vt). Problem is i get 8 different vertices and 9 different texture coords.
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
vt 0.000000 0.000000
vt 0.000000 -1.000000
vt -1.000000 -1.000000
vt -1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt -1.000000 1.000000
vt 1.000000 -1.000000
Therefore, i also gets a real messed up setup of Indices that makes it impossible to rearrange the position of texture coords to match the position in vertices.
f 5/1 1/2 4/3
f 5/1 4/3 8/4
f 3/1 7/5 8/6
f 3/1 8/6 4/7
f 2/1 6/5 3/4
f 6/7 7/1 3/2
f 1/1 5/5 2/4
f 5/7 6/1 2/2
f 5/5 8/8 6/1
f 8/1 7/2 6/9
f 1/1 2/2 3/3
f 1/1 3/3 4/4
Since iv'e understod now i can only use one array for indices since one vertex consists of both vertices and texture coords. Therefor i would need to rearrange one of the v/vt arrays a bit. But i can't, since if i move vt(at position 1) to position 5 (first line of faces), i would need to move it again to make it go all the way thru the indices array.
So basicly i wonder if this is a problem with the program "Blender" or if there is a solution to this that i can apply.