Partager via


Changing Depth Buffer Comparison Functions

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

By default, when depth-testing is performed on a rendering surface, Microsoft® Direct3D® Mobile updates the render-target surface if the corresponding depth value (z or w) for each point is less than the value in the depth buffer. In an application, you change how the system performs comparisons on depth values by calling the IDirect3DMobileDevice::SetRenderState method with the State parameter set to D3DMRS_ZFUNC (see D3DMRENDERSTATETYPE). The Value parameter should be set to a value in the D3DMCMPFUNC enumerated type.

See Also

Concepts

Depth Buffers