Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::Viewport Struct Reference

Describes the viewport. More...

#include <DeviceContext.h>

Public Member Functions

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

Public Attributes

Float32 TopLeftX = 0.f
 X coordinate of the left boundary of the viewport.
 
Float32 TopLeftY = 0.f
 Y coordinate of the top boundary of the viewport.
 
Float32 Width = 0.f
 Viewport width.
 
Float32 Height = 0.f
 Viewport Height.
 
Float32 MinDepth = 0.f
 Minimum depth of the viewport. Ranges between 0 and 1.
 
Float32 MaxDepth = 1.f
 Maximum depth of the viewport. Ranges between 0 and 1.
 

Detailed Description

Describes the viewport.

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

Member Data Documentation

◆ TopLeftY

Float32 Diligent::Viewport::TopLeftY = 0.f

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.