• Advertisement
Sign in to follow this  

VAO

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

Advertisement
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
http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt

Share this post


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

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

Share this post


Link to post
Share on other sites
Quote:
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