function updateTexture(texture, data, width, height) {
  const gl = this.gl;
  gl.bindTexture(gl.TEXTURE_2D, texture);
  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, data);
  gl.bindTexture(gl.TEXTURE_2D, null);
}
@param {WebGLTexture} texture
@param {Uint8Array} data
@param {Number} width
@param {Number} height