bindTexture2D(texture, unit) {
		const gl = this.gl;

		if (texture !== this.boundTextures[unit]) {
			this.flush();
			if (this.currentTextureUnit !== unit) {
				this.currentTextureUnit = unit;
				gl.activeTexture(gl.TEXTURE0 + unit);
			}

			gl.bindTexture(gl.TEXTURE_2D, texture);
			this.boundTextures[unit] = texture;
		} else if (this.currentTextureUnit !== unit) {
			this.flush();
			this.currentTextureUnit = unit;
			gl.activeTexture(gl.TEXTURE0 + unit);
		}
	}
assign the given WebGL texture to the current batch
@param {WebGLTexture} texture - a WebGL texture
@param {number} unit - Texture unit to which the given texture is bound