NoahKlabo

Members
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

104 Neutral

About NoahKlabo

  • Rank
    Newbie
  1. No thats not the problem, fixed it last night thanks anyway
  2. I've been modifying this md5mesh loader/parser to comply with my engine and I would like to switch the display function to use OpenGL call lists as opposed to glVertex pointers [source lang="cpp"] //original display function /* Draw each mesh of the model */ for (i = 0; i < md5file.num_meshes; ++i) { PrepareMesh (&md5file.meshes[i], skeleton); glVertexPointer (3, GL_FLOAT, 0, vertexArray); glDrawElements (GL_TRIANGLES, md5file.meshes[i].num_tris * 3, GL_UNSIGNED_INT, vertexIndices); }[/source] [source lang="cpp"] //My function /* Draw each mesh of the model */ for (i = 0; i < md5file.num_meshes; ++i) { PrepareMesh (&md5file.meshes[i], skeleton); glVertexPointer (3, GL_FLOAT, 0, vertexArray); do { //glColor4f /*if transparent*/ glBegin(GL_TRIANGLES); //gltexcoord2f() //times = times + 1; glVertex3f(vertexArray[times][0],vertexArray[times][1],vertexArray[times][2]); //gltexcoord2f() times = times + 1; glVertex3f(vertexArray[times][0],vertexArray[times][1],vertexArray[times][2]); //gltexcoord2f() times = times + 1; glVertex3f(vertexArray[times][0],vertexArray[times][1],vertexArray[times][2]); glEnd(); times = times + 1; }while(times < md5file.meshes[i].num_tris); } glutSwapBuffers (); glutPostRedisplay (); }[/source] . When I compiled it the outline of the model looks fine but the triangles of it are not correct.