title: OpenGL - glDrawElements vs Vertex Array Objects
body: <p>I need help to see the trade-offs between them.</p>
  
  <ul>
  <li>It looks to me that <code>glDrawElements()</code> needs to get the index-data "live" as a parameter.</li>
  <li>On the other side if I use VAOs then during startup I buffer the data and the driver might decide to put it on the GPU, then during rendering I only <em>bind</em> the VAO and call <code>glDrawArrays()</code>.</li>
  </ul>
  
  <p>Is there no way to combine the advantages? Can we buffer the index-data too?</p>
  
  <p>And how would that look in the vertex shader? Can it use the index and look it up in the vertex positions array?</p>