title: VBO and EBO state in WebGL
body: <p>In WebGL to draw something using an index buffer you would somewhat undergo this routine (as hinted by <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL" rel="nofollow">MDN</a>):</p>
  
  <p>setup:</p>
  
  <pre><code>bindBuffer(ARRAY_BUFFER);
  bufferData(pass vertex data);
  bindBuffer(ELEMENT_ARRAY_BUFFER);
  bufferData(pass index data);
  </code></pre>
  
  <p>drawing:</p>
  
  <pre><code>bindBuffer(ELEMENT_ARRAY_BUFFER);
  glDrawElements(...);
  </code></pre>
  
  <p>There is no <code>bindBuffer(ARRAY_BUFFER)</code> call. </p>
  
  <p>Suppose I have multiple VBO's with vertex data. How does an EBO will know from which buffer to take the data? </p>
  
  <p>In standard OpenGL I would encapsulate it in VAO. But lack thereof in WebGL is what confuses me.</p>