function loadPartialBufferSource(
  texture,
  arrayBufferView,
  xOffset,
  yOffset,
  width,
  height,
) {
  const context = texture._context;
  const gl = context._gl;

  const { pixelFormat, pixelDatatype } = texture;

  const unpackAlignment = PixelFormat.alignmentInBytes(
    pixelFormat,
    pixelDatatype,
    width,
  );
  gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);
  gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
  gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);

  if (texture.flipY) {
    arrayBufferView = PixelFormat.flipY(
      arrayBufferView,
      pixelFormat,
      pixelDatatype,
      width,
      height,
    );
  }
  gl.texSubImage2D(
    texture._textureTarget,
    0,
    xOffset,
    yOffset,
    width,
    height,
    pixelFormat,
    PixelDatatype.toWebGLConstant(pixelDatatype, context),
    arrayBufferView,
  );
}
Load texel data from a buffer into part of a texture

@param {Texture} texture The texture to which texel values will be loaded.
@param {TypedArray} arrayBufferView The texel values to be loaded into the texture.
@param {number} xOffset The texel x coordinate of the lower left corner of the subregion of the texture to be updated.
@param {number} yOffset The texel y coordinate of the lower left corner of the subregion of the texture to be updated.
@param {number} width The width of the source data, in pixels.
@param {number} width The height of the source data, in pixels.

@private