Share via


RenderStateManager.StencilFunction Property (Microsoft.DirectX.Direct3D)

Retrieves or sets the comparison function for the stencil test.

Definition

Visual Basic Public Property StencilFunction As Compare
C# public Compare StencilFunction { get; set; }
C++ public:
property Compare StencilFunction {
        Compare get();
        void set(Compare value);
}
JScript public function get StencilFunction() : Compare
public function set StencilFunction(Compare);

Property Value

Microsoft.DirectX.Direct3D.Compare
A value of the Compare enumeration that represents the comparison function to set or retrieve.

This property is read/write. 

Remarks

The default value is Compare.Always.

The comparison function is used to compare the reference value to a stencil buffer entry. This comparison applies only to the bits in the reference value and stencil buffer entry that are set in the stencil mask (by RenderStateManager.StencilMask). If the comparison is true, the stencil test passes.