title: WebGL indices array size
body: <p>For one of my WebGL projects I need to generate lots of objects with indices.
  For examples, cones. When JavaScript generates not so many everything works 
  fine, by adding another cones to the scene rendering becomes glitchy.</p>
  
  <p><img src="https://i.stack.imgur.com/WXKrq.png" alt="works fine with small number of cones"></p>
  
  <p><img src="https://i.stack.imgur.com/i6wVU.png" alt="glitchy with lots of them"></p>
  
  <p>I am pretty sure that the problem is in defining index buffer:</p>
  
  <pre><code>*var iBuffer = gl.createBuffer();
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, iBuffer);
  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array(glIndices), gl.STATIC_DRAW);*
  </code></pre>
  
  <p>To be more specific with <strong>Unit8Array</strong> or its transition to shader.</p>
  
  <p>Can anyone help me with that?</p>