ID3D10Device::RSSetViewports method

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

Syntax

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

Parameters

NumViewports

Type: UINT

Number of viewports to bind.

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

This method does not return a value.

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

   
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See Also

ID3D10Device Interface