Home / comp / gb.opengl / gl / viewport 
Gl.Viewport (gb.opengl)
Syntax
STATIC SUB Viewport ( X AS Integer, Y AS Integer, Width AS Integer, Height AS Integer )

Set the viewport

Parameters

Description

  Gl.Viewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (xnd, ynd) be normalized device coordinates. Then the window coordinates (xw, yw) are computed as follows:
glviewport1
glviewport2

  Viewport width and height are silently clamped to a range that depends on the implementation. This range is queried by calling Gl.MaxViewportDims.

Errors

Gl.GL_INVALID_VALUE is generated if either width or height is negative.
Gl.GL_INVALID_OPERATION is generated if Gl.Viewport is executed between the execution of Gl.Begin and the corresponding execution of Gl.End.

Associated Gets

Gl.GetViewport
Gl.MaxViewportDims


See also
Gl.DepthRange