Jump to content
  • Advertisement

Archived

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

ramsay_fr

vertex array

This topic is 5603 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

Hi everyone, I would like to have any information about vertex array, I''ve searched the net for some tutorial, but everything I''ve got is a spinning cube... So from what I''ve understood, vertex array need two array, one for the vertex themselves, and another one for face indices. So my question is how can I compute this indices array? If someone have an answer or can point me on a tutorial. Regards, Ramsay_fr

Share this post


Link to post
Share on other sites
Advertisement

0 1
+--------+
/| /|
3 / | 2 / |
+--------+ |
| 4| | 5|
| +-----|--+
| / | /
7|/ 6|/
+--------*

vertex[8] will be the xyz coords in space of the cube vertices

if you will draw the cube with glDrawArrays your indicies array will be {0,1,2,3, 1,5,6,2, 2,6,7,3, 6,5,4,7, 0,3,7,3, 0,4,5,1}
with argument GL_QUADS, and 6*4 elements
6 quads each has 4 vertices

I think nvidia has some tutorial with compiled vertex array





[edited by - cifko on January 23, 2003 11:18:01 PM]

[edited by - cifko on January 23, 2003 11:18:15 PM]

[edited by - cifko on January 23, 2003 11:18:24 PM]

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!