title: Understanding Vertex Array Objects (glGenVertexArrays )
body: <p>I am confused with the point in generating/creating a Vertex Array Object (VAO) with:</p>
  
  <pre><code>glGenVertexArrays(GLsizei n, GLuint *arrays);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>glBindVertexArray(GLuint);
  </code></pre>
  
  <p>Because I can still create a buffer object, say for vertices, and describe that buffer object with <code>glVertexAttribPointer</code> and <code>glEnableVertexAttribArray</code>without ever creating a VAO.</p>
  
  <p>My question is if you do not have to actually create the VAO to describe the data in a buffer object, why would such sources as the OpenGL SuperBible 5ed include a call to create a VAO when creating VBOs? Are they only used for more advanced topics I have yet to discover, am I totally confused? </p>
  
  <p>Also I first encountered this question when reading wikipedias entry on VBOs and their sample code includes no calls to <code>glGenVertexArrays()</code> but they still describe the data with <code>glVertexAttribPointer()</code>.<a href="http://en.wikipedia.org/wiki/Vertex_Buffer_Object" rel="nofollow noreferrer">Wiki VBO entry</a> --
  <a href="http://openglbook.com/chapter-2-vertices-and-shapes.html" rel="nofollow noreferrer">Example where VAOs are created for what reason?</a></p>