End
Map
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

ID3D11DeviceContext::ClearRenderTargetView method

Set all the elements in a render target to one value.

Syntax


void ClearRenderTargetView(
  [in]  ID3D11RenderTargetView *pRenderTargetView,
  [in]  const FLOAT ColorRGBA[4]
);

Parameters

pRenderTargetView [in]

Type: ID3D11RenderTargetView*

Pointer to the rendertarget.

ColorRGBA[4] [in]

Type: const FLOAT

A 4-component array that represents the color to fill the render target with.

Return value

Returns nothing.

Remarks

Applications that wish to clear a render target to a specific integer value bit pattern should render a screen-aligned quad instead of using this method. The reason for this is because this method accepts as input a floating point value, which may not have the same bit pattern as the original integer.

Differences between Direct3D 9 and Direct3D 11/10:

Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied.

 

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11DeviceContext

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.