Jump to content
  • Advertisement

Archived

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

outRider

vertex arrays

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

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

http://members.xoom.com/myBollux

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!