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);
  gles.glReadPixels(gl, x, y, width, height, WebGL.RGBA, WebGL.UNSIGNED_BYTE, buffer.jsify());
  return buffer;
}