D3D11_VIEWPORT Structure

Defines the dimensions of a viewport.

Syntax

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

Mitglieder

  • TopLeftX
    Typ: FLOAT

    X position of the left hand side of the viewport. Ranges between D3D11_VIEWPORT_BOUNDS_MIN and D3D11_VIEWPORT_BOUNDS_MAX.

  • TopLeftY
    Typ: FLOAT

    Y position of the top of the viewport. Ranges between D3D11_VIEWPORT_BOUNDS_MIN and D3D11_VIEWPORT_BOUNDS_MAX.

  • Width
    Typ: FLOAT

    Width of the viewport.

  • Height
    Typ: FLOAT

    Height of the viewport.

  • MinDepth
    Typ: FLOAT

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

  • MaxDepth
    Typ: FLOAT

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

Hinweise

In all cases, Width and Height must be >= 0 and TopLeftX + Width and TopLeftY + Height must be <= D3D11_VIEWPORT_BOUNDS_MAX.

Viewport Sizes and Feature Level Support Differences between Direct3D 11 and Direct3D 10:

The range for the minimum and maximum viewport size is dependent on the feature level defined by D3D_FEATURE_LEVEL.

  • Direct3D 11 supports fractional viewports; the parameter types are floating-point numbers. The feature level, D3D_FEATURE_LEVEL_11_0, supports (D3D11_VIEWPORT_BOUNDS_MIN, D3D11_VIEWPORT_BOUNDS_MAX) values between (-32768, 32,767).
  • Direct3D 10 does not support fractional viewports. The feature levels, D3D_FEATURE_LEVEL_10_1 (or below), supports (D3D10_VIEWPORT_BOUNDS_MIN, D3D10_VIEWPORT_BOUNDS_MAX) values between (-16384, 16383).

 

Anforderungen

Header

D3D11.h

Siehe auch

Core Structures