texSubImage2DIf method

void texSubImage2DIf(
  1. dynamic target,
  2. dynamic level,
  3. dynamic x,
  4. dynamic y,
  5. dynamic glFormat,
  6. dynamic glType,
  7. dynamic image,
)

Implementation

void texSubImage2DIf(target, level, x, y, glFormat, glType, image) {
  if (kIsWeb) {
    texSubImage2DNoSize(gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image.data);
  } else {
    texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data);
  }
}