viewport method

void viewport(
  1. GLint x,
  2. GLint y,
  3. GLsizei width,
  4. GLsizei height,
)

The WebGLRenderingContext.viewport() method of the WebGL API sets the viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.

Implementation

external void viewport(
  GLint x,
  GLint y,
  GLsizei width,
  GLsizei height,
);