D3D12_VIEWPORT structure

Describes the dimensions of a viewport.

Syntax

typedef struct D3D12_VIEWPORT {
  FLOAT TopLeftX;
  FLOAT TopLeftY;
  FLOAT Width;
  FLOAT Height;
  FLOAT MinDepth;
  FLOAT MaxDepth;
} D3D12_VIEWPORT;

Members

TopLeftX

X position of the left hand side of the viewport.

TopLeftY

Y position of the top of the viewport.

Width

Width of the viewport.

Height

Height of the viewport.

MinDepth

Minimum depth of the viewport. Ranges between 0 and 1.

MaxDepth

Maximum depth of the viewport. Ranges between 0 and 1.

Remarks

Pass an array of these structures to the pViewports parameter in a call to ID3D12GraphicsCommandList::RSSetViewports to set viewports for the display.

Requirements

   
Header d3d12.h

See Also

Core Structures