DepthStencilState Members

The following tables list the members exposed by the DepthStencilState type.

Public Constructors

Name Description
Public Method DepthStencilState Creates an instance of DepthStencilState with default values.

Public Fields

Name Description
Public Field Static Default A built-in state object with default settings for using a depth stencil buffer.
Public Field Static DepthRead A built-in state object with settings for enabling a read-only depth stencil buffer.
Public Field Static None A built-in state object with settings for not using a depth stencil buffer.

Public Properties

Name Description
Public Property CounterClockwiseStencilDepthBufferFail Gets or sets the stencil operation to perform if the stencil test passes and the depth-buffer test fails for a counterclockwise triangle. The default is StencilOperation.Keep.
Public Property CounterClockwiseStencilFail Gets or sets the stencil operation to perform if the stencil test fails for a counterclockwise triangle. The default is StencilOperation.Keep.
Public Property CounterClockwiseStencilFunction Gets or sets the comparison function to use for counterclockwise stencil tests. The default is CompareFunction.Always.
Public Property CounterClockwiseStencilPass Gets or sets the stencil operation to perform if the stencil and depth-tests pass for a counterclockwise triangle. The default is StencilOperation.Keep.
Public Property DepthBufferEnable Enables or disables depth buffering. The default is true.
Public Property DepthBufferFunction Gets or sets the comparison function for the depth-buffer test. The default is CompareFunction.LessEqual
Public Property DepthBufferWriteEnable Enables or disables writing to the depth buffer. The default is true.
Public Property GraphicsDevice (Inherited from GraphicsResource.)
Public Property IsDisposed (Inherited from GraphicsResource.)
Public Property Name (Inherited from GraphicsResource.)
Public Property ReferenceStencil Specifies a reference value to use for the stencil test. The default is 0.
Public Property StencilDepthBufferFail Gets or sets the stencil operation to perform if the stencil test passes and the depth-test fails. The default is StencilOperation.Keep.
Public Property StencilEnable Gets or sets stencil enabling. The default is false.
Public Property StencilFail Gets or sets the stencil operation to perform if the stencil test fails. The default is StencilOperation.Keep.
Public Property StencilFunction Gets or sets the comparison function for the stencil test. The default is CompareFunction.Always.
Public Property StencilMask Gets or sets the mask applied to the reference value and each stencil buffer entry to determine the significant bits for the stencil test. The default mask is Int32.MaxValue.
Public Property StencilPass Gets or sets the stencil operation to perform if the stencil test passes. The default is StencilOperation.Keep.
Public Property StencilWriteMask Gets or sets the write mask applied to values written into the stencil buffer. The default mask is Int32.MaxValue.
Public Property Tag (Inherited from GraphicsResource.)
Public Property TwoSidedStencilMode Enables or disables two-sided stenciling. The default is false.

Public Methods

Name Description
Public Method Dispose Overloaded. Immediately releases the unmanaged resources used by this object.
Public Method Equals (Inherited from Object.)
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method ToString (Inherited from GraphicsResource.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from GraphicsResource.)
Protected Method MemberwiseClone (Inherited from Object.)

Public Events

Name Description
Public Event Disposing (Inherited from GraphicsResource.)

See Also

Reference

DepthStencilState Class
Microsoft.Xna.Framework.Graphics Namespace