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

ID3D11Device::CreateDepthStencilView method

Create a depth-stencil view for accessing resource data.

Syntax


HRESULT CreateDepthStencilView(
  [in]   ID3D11Resource *pResource,
  [in]   const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
  [out]  ID3D11DepthStencilView **ppDepthStencilView
);

Parameters

pResource [in]

Type: ID3D11Resource*

Pointer to the resource that will serve as the depth-stencil surface. This resource must have been created with the D3D11_BIND_DEPTH_STENCIL flag.

pDesc [in]

Type: const D3D11_DEPTH_STENCIL_VIEW_DESC*

Pointer to a depth-stencil-view description (see D3D11_DEPTH_STENCIL_VIEW_DESC). Set this parameter to NULL to create a view that accesses mipmap level 0 of the entire resource (using the format the resource was created with).

ppDepthStencilView [out]

Type: ID3D11DepthStencilView**

Address of a pointer to an ID3D11DepthStencilView. Set this parameter to NULL to validate the other input parameters (the method will return S_FALSE if the other input parameters pass validation).

Return value

Type: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Remarks

A depth-stencil view can be bound to the output-merger stage by calling ID3D11DeviceContext::OMSetRenderTargets.

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11Device

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.