javascript - WebGL indices array size -
for 1 of webgl projects need generate lots of objects indices. examples, cones. when javascript generates not many works fine, adding cones scene rendering becomes glitchy.
i pretty sure problem in defining index buffer:
*var ibuffer = gl.createbuffer(); gl.bindbuffer(gl.element_array_buffer, ibuffer); gl.bufferdata(gl.element_array_buffer, new uint8array(glindices), gl.static_draw);*
to more specific unit8array or transition shader.
can me that?
if use uint8 indices limiting maximum of 256 unique vertices per drawcall, if batch draw it's exceeding max value of uint8 , integer truncation means end effectvely random vertex connectivity across models.
increase uint16 indices let have 65536 unique vertices per draw.
Comments
Post a Comment