title: WebGL; Instanced rendering - setting up divisors
body: <p>I'm trying to draw a lot of cubes in webgl using instanced rendering (<code>ANGLE_instanced_arrays</code>).</p>
  
  <p>However I can't seem to wrap my head around how to setup the divisors. I have the following buffers;</p>
  
  <p>36 vertices (6 faces made from 2 triangles using 3 vertices each).
  6 colors per cube (1 for each face).
  1 translate per cube.</p>
  
  <p>To reuse the vertices for each cube; I've set it's divisor to 0.
  For color I've set the divisor to 2 (i.e. use same color for two triangles - a face)).
  For translate I've set the divisor to 12 (i.e. same translate for 6 faces * 2 triangles per face).</p>
  
  <p>For rendering I'm calling
  <code>
  ext_angle.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 36, num_cubes);
  </code></p>
  
  <p>This however does not seem to render my cubes. </p>
  
  <p>Using translate divisor 1 does but the colors are way off then, with cubes being a single solid color.</p>
  
  <p>I'm thinking it's because my instances are now the full cube, but if I limit the <code>count</code> (i.e. vertices per instance), I do not seem to get all the way through the vertices buffer, effectively I'm just rendering one triangle per cube then.</p>
  
  <p>How would I go about rendering a lot of cubes like this; with varying colored faces?</p>