 | glViewport Method (Int32, Int32) |
Set the viewport.
Namespace:
Ooogles
Assembly:
Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static void Viewport(
int width,
int height
)
Public Shared Sub Viewport (
width As Integer,
height As Integer
)
public:
static void Viewport(
int width,
int height
)
static member Viewport :
width : int *
height : int -> unit
Parameters
- width
- Type: SystemInt32
width of the viewport. - height
- Type: SystemInt32
height of the viewport.
ExceptionsException | Condition |
---|
GLException | InvalidValue 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