RenderState.DepthBufferWriteEnable Property

Enables or disables writing to the depth buffer. The default is true.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public bool DepthBufferWriteEnable { get; set; }

Property Value

true if writing to the depth buffer is enabled; false otherwise.

This property 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 DepthBufferFunction, assuming that depth buffering is taking place, but depth values are not written to the buffer.

Xbox 360, Windows XP SP2, Windows Vista