src/graphics/webgl-layer.js
function() {
        var gl = this.context;
        gl.bindBuffer(gl.ARRAY_BUFFER, this._attributeBuffer);
        gl.bufferData(gl.ARRAY_BUFFER, this._attributeArray, gl.STATIC_DRAW);
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
        gl.bufferData(
            gl.ELEMENT_ARRAY_BUFFER,
            this._indexArray,
            gl.STATIC_DRAW
        );
        gl.drawElements(gl.TRIANGLES, this.index_pointer, gl.UNSIGNED_SHORT, 0);
    }
function() {
        var gl = this.context;
        gl.bindBuffer(gl.ARRAY_BUFFER, this._attributeBuffer);
        gl.bufferData(gl.ARRAY_BUFFER, this._attributeArray, gl.STATIC_DRAW);
        gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._indexBuffer);
        gl.bufferData(
            gl.ELEMENT_ARRAY_BUFFER,
            this._indexArray,
            gl.STATIC_DRAW
        );
        gl.drawElements(gl.TRIANGLES, this.index_pointer, gl.UNSIGNED_SHORT, 0);
    }
function ( ) { var gl = this . context ; gl . bindBuffer ( gl . ARRAY_BUFFER , this . _attributeBuffer ) ; gl . bufferData ( gl . ARRAY_BUFFER , this . _attributeArray , gl . STATIC_DRAW ) ; gl . bindBuffer ( gl . ELEMENT_ARRAY_BUFFER , this . _indexBuffer ) ; gl . bufferData ( gl . ELEMENT_ARRAY_BUFFER , this . _indexArray , gl . STATIC_DRAW ) ; gl . drawElements ( gl . TRIANGLES , this . index_pointer , gl . UNSIGNED_SHORT , 0 ) ; }
Writes data from the attribute and index arrays to the appropriate buffers, and then calls drawElements.
Writes data from the attribute and index arrays to the appropriate buffers and then calls drawElements .