Manipulating the Depth Buffer (Direct3D 9)

Depth buffers are associated with the device. Applications are required to move the depth buffers when they set render targets. The IDirect3DDevice9::GetDepthStencilSurface and IDirect3DDevice9::SetDepthStencilSurface methods are used to manipulate depth buffers.

Presenting a Scene