Click or drag to resize

glViewport Method (Int32, Int32)

Set the viewport.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void Viewport(
	int width,
	int height
)

Parameters

width
Type: SystemInt32
width of the viewport.
height
Type: SystemInt32
height of the viewport.
Exceptions
ExceptionCondition
GLExceptionInvalidValue if either width or height is negative.
Remarks
When a GL context is first attached to a window, width and height are set to the dimensions of that window.

This method specifies the affine transformation of X and Y from normalized device coordinates to window coordinates.

Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call GetMaxViewportDimensions(Int32, Int32).

OpenGL API: glViewport

See Also