?/TD>
Microsoft DirectX 9.0

IDirect3DDevice9::SetDepthStencilSurface Method


Sets the depth stencil surface.

Syntax

HRESULT SetDepthStencilSurface(      

    IDirect3DSurface9 *pZStencilSurface );

Parameters

pZStencilSurface
[in] Address of a pointer to an IDirect3DSurface9 interface, representing the depth stencil surface. Setting this to NULL disables the depth stencil operation and releases the previous depth stencil buffer.

Return Value

If the method succeeds, the return value is D3D_OK.

If pZStencilSurface is other than NULL, the return value is D3DERR_INVALIDCALL when the stencil surface is invalid.



Remarks

Restrictions for using this method include the following:

These restrictions are validated only when using the debug runtime when any of the IDirect3DDevice9?B>Draw methods are called.

Cube textures differ from other surfaces in that they are collections of surfaces. To call IDirect3DDevice9::SetDepthStencilSurface with a cube texture, you must select an individual face using IDirect3DCubeTexture9::GetCubeMapSurface and pass the resulting surface to IDirect3DDevice9::SetDepthStencilSurface.

See Also

IDirect3DDevice9::GetDepthStencilSurface


© 2002 Microsoft Corporation. All rights reserved.