The OpenGL model header file I'm working with contains definitions along the following:
static const float modelVertices[NUM_OBJECT_VERTEX * 3] = {}
static const float modelTexCoords[NUM_OBJECT_VERTEX * 2] = {}
static const float modelNormals[NUM_OBJECT_VERTEX * 3] = {}
static const unsigned short modelIndices[NUM_OBJECT_INDEX] = {}
Where there are a bunch of numbers (floats and integers, as fitting) separated by comma's inbetween the brackets.
It seems straight-forward to convert an .obj file's v, vt, vn
to the above format. My .obj file also has a bunch of f
's which include triplets separated by /
. I'm not sure what these parameters are exactly...
Which parameters do I need to convert to get the fourth - the modelIndices?
(I need to admit in advance that I am a newbie to OpenGL, so apologies if this seems too elementary!)