Hi,
I’m loading objects via the ASE format (from 3dsMax) and I seem to be missing something.
I’ve got the objects in, but I can’t seem to figure out how to get the texture coords correct.
The ASE file has a list of tex coords and list of “orders” for the tex coords (just like like for the vertices/faces)
How do I specify the texture orders?
I’m using CVA’s and here the snippet I use to render my scene…
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
for(int i = 1; i <= objCount; i++) {
glTexCoordPointer(2, GL_FLOAT, sizeof(float) * 2, objArray[i].texCoordArray);
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), objArray[i].vertArray);
glLockArrays(0, objArray[i].vCount);
glDrawElements(GL_TRIANGLES, objArray[i].fCount, GL_UNSIGNED_INT,
objArray[i].faceOrderArray);
glUnlockArrays();
}
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
It’s clear that I needed to specify the vertex list and the ordering for the model data (faces)…but how can I do the same with with the tex coords…
Before I startd using CVA’s, I did all this in loops with GLBegin(GL_TRIANGLES) so it was no problem…
Any help would greatly be appreciated…