Manipulating the Depth Buffer

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.