title: OpenGL ES 2.0: Commands required just before glDrawElements with VBO
body: <p>I've setup a Vertex Buffer Object (VBO) with vertex and index data. I've also created a GLprogram to use custom shaders, so I call <code>glUseProgram</code> within my code.</p>
  
  <p>My vertex data changes every frame, so I've supplied <code>GL_STREAM_DRAW</code> to my two <code>glBufferData</code> calls (one for vertex data, one for indices).</p>
  
  <p>I use <code>glBufferSubData</code> to modify regions of my vertex data when they change. At each frame I want to draw from the first vertex to the Nth, with N being a changing value.</p>
  
  <p>My question is: <strong>which commands must I call <em>every time</em> that I call <code>glDrawElements</code>?</strong> Ideally I'd like to simply call <code>glDrawElements</code> on its own in each frame, for performance reasons.</p>
  
  <p>I'm poring over the book "OpenGL ES 2.0 Programming Guide" but nowhere does it tell me which commands I must use every time I draw, and which I need to call only once.</p>