Export (0) Print
Expand All
End
Map
Expand Minimize
This topic has not yet been rated - Rate this topic

ID3D11DeviceContext::RSGetViewports method

Gets the array of viewports bound to the rasterizer stage.

Syntax


void RSGetViewports(
  [in, out]  UINT *pNumViewports,
  [out]      D3D11_VIEWPORT *pViewports
);

Parameters

pNumViewports [in, out]

Type: UINT*

A pointer to a variable that, on input, specifies the number of viewports (ranges from 0 to D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) in the pViewports array; on output, the variable contains the actual number of viewports that are bound to the rasterizer stage. If pViewports is NULL, RSGetViewports fills the variable with the number of viewports currently bound.

Note  In some versions of the Windows SDK, a debug device will raise an exception if the input value in the variable to which pNumViewports points is greater than D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE even if pViewports is NULL. The regular runtime ignores the value in the variable to which pNumViewports points when pViewports is NULL. This behavior of a debug device might be corrected in a future release of the Windows SDK.

pViewports [out]

Type: D3D11_VIEWPORT*

An array of D3D11_VIEWPORT structures for the viewports that are bound to the rasterizer stage. If the number of viewports (in the variable to which pNumViewports points) is greater than the actual number of viewports currently bound, unused elements of the array contain 0. For info about how the viewport size depends on the device feature level, which has changed between Direct3D 11 and Direct3D 10, see D3D11_VIEWPORT.

Return value

Returns nothing.

Remarks

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11DeviceContext

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.