Share via


RenderStateManager.ZBufferWriteEnable Property (Microsoft.DirectX.Direct3D)

Enables or disables writing to the depth buffer.

Definition

Visual Basic Public Property ZBufferWriteEnable As Boolean
C# public bool ZBufferWriteEnable { get; set; }
C++ public:
property bool ZBufferWriteEnable {
        bool get();
        void set(bool value);
}
JScript public function get ZBufferWriteEnable() : boolean
public function set ZBufferWriteEnable(boolean);

Property Value

System.Boolean
Set to true to enable writing to the depth buffer, or false to disable it.

This property is read/write. 

Remarks

The default value is true.

This member enables an application to prevent the system from updating the depth buffer with new depth values.

If false, depth comparisons are still made according to the render state ZBufferFunction, assuming that depth buffering is taking place, but depth values are not written to the buffer.