• ### What is your GameDev Story?

#### Archived

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

# vertex array

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

## 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 on other sites
   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]

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634092
• Total Posts
3015448
×