CD3D11_VIEWPORT::CD3D11_VIEWPORT(ID3D11Texture2D*,ID3D11RenderTargetView*,FLOAT,FLOAT,FLOAT,FLOAT) function (d3d11.h)

Instantiates a new instance of a CD3D11_VIEWPORT structure that is initialized with 2D texture values.

Syntax

void CD3D11_VIEWPORT(
  ID3D11Texture2D        *pTex2D,
  ID3D11RenderTargetView *pRTView,
  FLOAT                  topLeftX,
  FLOAT                  topLeftY,
  FLOAT                  minDepth,
  FLOAT                  maxDepth
);

Parameters

pTex2D

A pointer to a ID3D11Texture2D interface for a 2D texture.

pRTView

A pointer to a ID3D11RenderTargetView interface for the render-target view.

topLeftX

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

topLeftY

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

minDepth

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

maxDepth

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

Return value

None

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11.h
Library D3D11.lib

See also

CD3D11_VIEWPORT