texSubImage2DIf method

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

Implementation

void texSubImage2DIf(int target, int level, int x, int y, int glFormat, int glType, ImageElement image) {
  if (kIsWeb && image.data is! NativeArray) {
    texSubImage2DNoSize(WebGL.TEXTURE_2D, level, x, y, glFormat, glType, image.data);
  }
  else {
    texSubImage2D(WebGL.TEXTURE_2D, level, x, y, image.width, image.height, glFormat, glType, image.data);
  }
}