Table of Contents

Method glViewport

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

glViewport(int, int, int, int)

Sets the viewport for rendering in OpenGL.

public static extern void glViewport(int x, int y, int width, int height)

Parameters

x int

The x-coordinate of the lower-left corner of the viewport, in pixels.

y int

The y-coordinate of the lower-left corner of the viewport, in pixels.

width int

The width of the viewport, in pixels. Must be greater than or equal to 0.

height int

The height of the viewport, in pixels. Must be greater than or equal to 0.

Remarks

The viewport specifies the affine transformation of normalized device coordinates to window coordinates. It defines the rectangular region of the window where OpenGL will draw. Typically, this method is called during initialization or when the window is resized.