Microsoft DirectX 8.1 (C++) |
By default, the Microsoft® Direct3D® system is allowed to write to the depth buffer. Most applications leave writing to the depth buffer enabled, but you can achieve some special effects by not allowing the Direct3D system to write to the depth buffer.
You can disable depth buffer writes in C++ by calling the IDirect3DDevice8::SetRenderState method with the State parameter set to D3DRS_ZWRITEENABLE and the Value parameter set to 0.