This topic is now archived and is closed to further replies.

vertex arrays

This topic is 6032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m having a little problem understanding them. I have the following setup... type face { short normalindex[3]; short vertexindex[3]; } type vertex { float vertex[3]; } type texcoord { float texcoord[2]; } type normal { float normal[3]; } type mesh { type *face; type *vertex; type *texcoord; type *normal; } glVertexPointer(3, GL_FLOAT, 0, mesh.vertex); glNormalPointer(GL_FLOAT, 0, mesh.normal); Now, if I use glDrawElements and pass mesh.vertexindex it doesn''t work, even if i specify a 6 byte offset (3 shorts for the normal index); Second, Im not even sure how I could use the normals and the texture coords with glDrawElements... I know I can use glInterleavedArray but that uses the actual vertices/normals/etc and not the indices.... Can anyone explain a solution to me? ------------ - outRider -

Share this post

Link to post
Share on other sites