ID3D10Device::RSSetViewports method (d3d10.h)

Bind an array of viewports to the rasterizer stage of the pipeline.

Syntax

void RSSetViewports(
  [in] UINT                 NumViewports,
  [in] const D3D10_VIEWPORT *pViewports
);

Parameters

[in] NumViewports

Type: UINT

Number of viewports to bind.

[in] pViewports

Type: const D3D10_VIEWPORT*

An array of viewports (see D3D10_VIEWPORT) to bind to the device. Each viewport must have its extents within the allowed ranges: D3D10_VIEWPORT_BOUNDS_MIN, D3D10_VIEWPORT_BOUNDS_MAX, D3D10_MIN_DEPTH, and D3D10_MAX_DEPTH.

Return value

None

Remarks

All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.

Which viewport to use is determined by the SV_ViewportArrayIndex semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the SV_ViewportArrayIndex semantic then Direct3D will use the first viewport in the array.

Requirements

Requirement Value
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See also

ID3D10Device Interface