texImage2D method

void texImage2D(
  1. int target,
  2. int level,
  3. int internalformat,
  4. int format_OR_width,
  5. int height_OR_type,
  6. dynamic bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video,
  7. [int? format,
  8. int? type,
  9. TypedData? pixels]
)

Implementation

void texImage2D(
    int target,
    int level,
    int internalformat,
    int format_OR_width,
    int height_OR_type,
    bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video,
    [int? format,
    int? type,
    TypedData? pixels]) {
  if (type != null &&
      format != null &&
      (bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
    _texImage2D_1(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video,
        format,
        type,
        pixels);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData) &&
      format == null &&
      type == null &&
      pixels == null) {
    var pixels_1 = convertDartToNative_ImageData(
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    _texImage2D_2(target, level, internalformat, format_OR_width,
        height_OR_type, pixels_1);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is ImageElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_3(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is CanvasElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_4(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is VideoElement) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_5(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  if ((bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video
          is ImageBitmap) &&
      format == null &&
      type == null &&
      pixels == null) {
    _texImage2D_6(
        target,
        level,
        internalformat,
        format_OR_width,
        height_OR_type,
        bitmap_OR_border_OR_canvas_OR_image_OR_pixels_OR_video);
    return;
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}