readCurrentPixels method

Uint8List readCurrentPixels(
  1. int x,
  2. int y,
  3. int width,
  4. int height,
)

Implementation

Uint8List readCurrentPixels(int x, int y, int width, int height) {
  int _len = width * height * 4;
  var buffer = Uint8List(_len);
  gl.readPixels(x, y, width, height, RGBA, UNSIGNED_BYTE, buffer);
  return buffer;
}