Henri

04-07-2003, 11:29 PM

I have a problem that I don’t seem to get my head around. I’m loading in an md2 model, and I end up with a vertex index list and a texture coordinate index list. (They are currently stored like this:

texIndex[numFaces][3] and

verIndex[numFaces][3])

Now I would like to draw the models using vertex arrays, and thus I can only use one index list. And that has to be the vertex list. Right?! And I have this up and running and the model look good. But the textures are obvious a mess! So how do I sort the texture coordinates so they match with the vertices. I have tried different ways but it doesn’t come out right…

So how do I sort the texture coordinates and by what?

// Thanks Henri

texIndex[numFaces][3] and

verIndex[numFaces][3])

Now I would like to draw the models using vertex arrays, and thus I can only use one index list. And that has to be the vertex list. Right?! And I have this up and running and the model look good. But the textures are obvious a mess! So how do I sort the texture coordinates so they match with the vertices. I have tried different ways but it doesn’t come out right…

So how do I sort the texture coordinates and by what?

// Thanks Henri