3
\$\begingroup\$

i've just started out with Opengl, and i've got to know what Vertex Buffer Objects are, but i really don't understand what VAOs are. Can someone help me?

\$\endgroup\$

1 Answer 1

9
\$\begingroup\$

A VAO (or Vertex Array Object) is basically an OpenGL object. They allow us to bind Vertex Buffers with a specification for the layout of that Vertex Buffer. A VAO can be bound just like a vertex buffer object and any subsequent vertex attribute calls from that point on will be stored inside the VAO.

This has the advantage that when configuring vertex attribute pointers you only have to make those calls once and whenever we want to draw the object, we can just bind the corresponding VAO. This makes switching between different vertex data and attribute configurations as easy as binding a different VAO.

One thing to remember is that Core OpenGL (OpenGL version 3.x and 4.x) requires that we use a VAO so it knows what to do with our vertex inputs. If we fail to bind a VAO, OpenGL will most likely refuse to draw anything.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I would also like to leave you two useful links about Vaos and Opengl in general: 1)youtu.be/Bcs56Mm-FJY 2)learnopengl.com/#!Getting-started/Hello-Triangle they are really good resources, especially LearnOpengl :D \$\endgroup\$
    – user100681
    Commented Nov 29, 2017 at 21:40
  • 1
    \$\begingroup\$ Thank you for the additional links ! Really appreciated! \$\endgroup\$
    – El Itrov
    Commented Nov 29, 2017 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .