drawBatches() { const dcCount = this._dcIndex; const {gl, state: stateSystem} = this.renderer; const drawCalls = AbstractBatchRenderer._drawCallPool; let curTexArray = null; // Upload textures and do the draw calls for (let i = 0; i < dcCount; i++) { const {texArray, type, size, start, blend} = drawCalls[i]; if (curTexArray !== texArray) { curTexArray = texArray; this.bindAndClearTexArray(texArray); } this.state.blendMode = blend; stateSystem.set(this.state); gl.drawElements(type, size, gl.UNSIGNED_SHORT, start * 2); } }
const drawCalls = AbstractBatchRenderer._drawCallPool; let dcIndex = this._dcIndex; let aIndex = this._aIndex;
drawBatches() { const dcCount = this._dcIndex; const {gl, state: stateSystem} = this.renderer; const drawCalls = AbstractBatchRenderer._drawCallPool; let curTexArray = null; // Upload textures and do the draw calls for (let i = 0; i < dcCount; i++) { const {texArray, type, size, start, blend} = drawCalls[i]; if (curTexArray !== texArray) { curTexArray = texArray; this.bindAndClearTexArray(texArray); } this.state.blendMode = blend; stateSystem.set(this.state); gl.drawElements(type, size, gl.UNSIGNED_SHORT, start * 2); } }
const drawCalls = AbstractBatchRenderer._drawCallPool; let dcIndex = this._dcIndex; let aIndex = this._aIndex;