Diligent::Viewport struct

Describes the viewport.

This structure is used by IDeviceContext::SetViewports().

Constructors, destructors, conversion operators

Viewport(Float32 _TopLeftX, Float32 _TopLeftY, Float32 _Width, Float32 _Height, Float32 _MinDepth = 0, Float32 _MaxDepth = 1) noexcept
Initializes the structure.

Public variables

Float32 TopLeftX
X coordinate of the left boundary of the viewport.
Float32 TopLeftY
Y coordinate of the top boundary of the viewport. When defining a viewport, DirectX convention is used: window coordinate systems originates in the LEFT TOP corner of the screen with Y axis pointing down.
Float32 Width
Viewport width.
Float32 Height
Viewport Height.
Float32 MinDepth
Minimum depth of the viewport. Ranges between 0 and 1.
Float32 MaxDepth
Maximum depth of the viewport. Ranges between 0 and 1.