EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

viewport method

Represents a rectangular viewable area that contains the rendering results of the drawing buffer.

IE11

 

Syntax

WebGLRenderingContext.viewport(x, y, width, height);

Parameters

x [in]

Type: Number

The horizontal component of the viewport origin. Default is 0.

y [in]

Type: Number

The vertical component of the viewport origin. Default is 0.

width [in]

Type: Number

The width of the viewport. Default equals the width of the parent canvas (width).

height [in]

Type: Number

The height of the viewport. Default equals the height of the parent canvas (height).

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_VALUE If the width or height is negative.

 

See also

WebGLRenderingContext

 

 

Afficher:
© 2014 Microsoft