Jump to content
  • Advertisement
Sign in to follow this  


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

VAOs as i understand it saves the pointers to buffers that VBO uses.
It's pretty simple

1. Generate one one more VAOs using glGenVertexArrays(sizei n, uint *arrays); , it works just like generating a texture.
2. Then bind it using glBindVertexArray(uint array);, again just like a texture.
3. set the pointers(such as VertexAttribPointer) to your VBO.
4. that's it, do another one if you like

now the next time you call glBindVertexArray with your VAO those pointers and states you set previously will be recalled, even if you set another set of pointers/states in another VAO previously.

At least that's how i think it works, never had a chance to test it.
It's pretty neat if you ask me, it saves in on a lot of clutter when it comes to rendering with VBOs.

here is a nice read for you

Share this post

Link to post
Share on other sites
Original post by Pooya65
how can i draw VAO context and how can i fill it?

i must set client states in every frame like as VBO?!

no i don't think so, that's the whole idea behind VAO, once you set it up you can reuse it in the simplest way possible.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • 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!