Viewport

Definition
The viewport method sets the viewport.

Syntax

 * gl.viewport(x, y, width, height)

Parameters

 * x: integer, the default value is 0
 * y: integer, the default value is 0
 * width: non-negative integer
 * height: non-negative integer

Examples

 * // Sets the viewport to be the size of the canvas object
 * gl.viewport(0, 0, canvas.width, canvas.height);