readPixels method

void readPixels(
  1. GLint x,
  2. GLint y,
  3. GLsizei width,
  4. GLsizei height,
  5. GLenum format,
  6. GLenum type,
  7. ArrayBufferView? pixels,
)

The WebGLRenderingContext.readPixels() method of the WebGL API reads a block of pixels from a specified rectangle of the current color framebuffer into a TypedArray or a DataView object.

Implementation

external void readPixels(
  GLint x,
  GLint y,
  GLsizei width,
  GLsizei height,
  GLenum format,
  GLenum type,
  ArrayBufferView? pixels,
);