Jump to content
  • Advertisement


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


vertex arrays

This topic is 6319 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
>>type face
short normalindex[3];
short vertexindex[3];

u cant have 2 indexs, vertices/texcoords/normals/colours all have to share the same index.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!