glReadPixels method

void glReadPixels(
  1. int x,
  2. int y,
  3. int width,
  4. int height,
  5. int format,
  6. int type,
  7. TypedData? pixels,
)

Implementation

void glReadPixels(
  int x,
  int y,
  int width,
  int height,
  int format,
  int type,
  TypedData? pixels,
) {
  switch (pixels) {
    case null:
      _glReadPixels(x, y, width, height, format, type, ffi.nullptr);
    case Float64List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Float32List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Int32List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Int16List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Int8List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Uint32List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Uint16List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Uint8List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Int64List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
    case Uint64List d:
      _glReadPixels(x, y, width, height, format, type, d.address.cast<ffi.Void>());
  }
}