Hi,
I’ve been working on Wavefront OBJ model loading, and I’ve got a basic working API going on. But my problem is that the indices in the OBJ specification are allowed to have multiple vertex attribute indices. By vertex attributes I mean positions, normals, and texture coordinates. Like so:
v x, y, z
vn x, y, z
vt u, v
usemtl ...
f v1/n1/t1 v3/n3/t3 v2/n2/t2
But my problem is that in OpenGL you can only specify indices grouping vertices and normals and texture coordinate’s indices. So if the OBJ file had something like this: (which blender exports as actually):
f v1/n32/t4 v8/n11/t39 v90/n12/t34
I would have to create a special vertex for that specific face and do some wierd tracking to draw it correctly in the OpenGL indices…
Does anyone have a solution to this? OBJ loaders are quite popular here…