ID3D11DeviceContext::RSSetScissorRects Method

Bind an array of scissor rectangles to the rasterizer stage.

Syntax

public:
void RSSetScissorRects(
         UINT NumRects,
         const D3D11_RECT *pRects
)  

Parameters

NumRects
Type: UINT 

[in] Number of scissor rectangles to bind.

pRects
Type: D3D11_RECT *

[in, optional] An array of scissor rectangles (see D3D11_RECT).

Return value

None.

Remarks

Note On Xbox, ID3D11DeviceContext::RSSetState must be called before calling ID3D11DeviceContext::RSSetScissorRects; otherwise, rendering artifacts can occur.

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

The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see D3D11_RASTERIZER_DESC).

Which scissor rectangle 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 scissor rectangle in the array.

Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see ID3D11DeviceContext::RSSetViewports).

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext

ID3D11DeviceContext Members