Skip to main content
gamedev.net
🔒 Locked

texturing an md2 model

Started by ECKILLER 0 replies 450+ views
Original Post
ECKILLER
ECKILLER
Hi, I have an md2 rendered correctly in wireframes. But now i need to texture it. Here''s what i got: Given: verts and st are valid pointers and contain correct data. Also you should know that this code gets called in a loop once for each primitive in the model. This should be hopefully just opengl syntax that i''m doing wrong. Or need to do. glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glVertexPointer(3, GL_FLOAT, 0, verts); glTexCoordPointer(2, GL_FLOAT, 0, st); if(model->Primitives.PrimitiveType == MD2_TRIANGLESTRIP) { glDrawElements(GL_TRIANGLE_STRIP, model->Primitives[i].NumFaceIndices, GL_UNSIGNED_INT, indices); } if(model->Primitives[i].PrimitiveType == MD2_TRIANGLEFAN) { glDrawElements(GL_TRIANGLE_FAN, model->Primitives[i].NumFaceIndices, GL_UNSIGNED_INT, indices); } Thank you. ECKILLER
ECKILLER
ECKILLER
ECKILLER
anybody?

ECKILLER
ECKILLER

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.