1.创建步骤
var indices=new Uint8Array([0,1,2,0,2,3]);
var indexBuffer=gl.createBuffer();
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,indexBuffer);
gl.bufferData(gl.ELEMENT_ARRAT_BUFFER,indices,gl.STATIC_DRAW);
//
gl.drawElements(gl.TRIANGLES,n,gl.UNSIGNED_BYTE,0);
和创建缓冲区的步骤有所类似