title: WebGL split 32 bit index buffer into 16 bit index buffer
body: <p>Due to the limitation of webgl index buffer, only 16 bit is allowed, which indicates we can not have vertex buffer size larger than 65536. For loading a big mesh model, one has to split vertex buffer into multiple and reindexing corresponding index buffer. If one has only one index buffer corresponding to one vertex buffer, the splitting algorithm is not complex and efficient. However, if one has a big vertex buffer corresponds to several index buffers (e.g. one point index buffer, one line index buffer, one triangle index buffer, etc., ...), it would be a bit more complex to split the buffer into multiple. Is there any algorithm to split the vertex buffer and multiple index buffers into multiple sub vertex buffer (buffer size &lt;= 65526) and multiple sub index buffers? </p>
  
  <p>I have coded an algorithm to deal with the splitting, however, it is not efficient. My idea is that each time, when creating a new sub vertex buffer using one index buffer, we need to loop the other index buffers to extract elements exist in the new created sub vertex buffer. Finally, we may leave some indices in each src index buffer, we just try to append to a new sub vertex and sub index buffer. </p>
  
  <p>This is a bad idea not efficient. Is there any algorithm or alternative of doing this efficiently? </p>
  
  <p>Any suggestion would be appreciated.</p>