CompareFunction Enumeration (Microsoft.Xna.Framework.Graphics)

The comparison function used for depth, stencil, and alpha tests.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public enum CompareFunction

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The CompareFunction type exposes the following members.

  Platforms Name Description
Always Always passes the test. 
Equal Passes the test when the new pixel value is equal to current pixel value. 
Greater Passes the test when the new pixel value is greater than current pixel value. 
GreaterEqual Passes the test when the new pixel value is greater than or equal to current pixel value. 
Less Passes the test when the new pixel value is less than current pixel value. 
LessEqual Passes the test when the new pixel value is less than or equal to current pixel value. 
Never Never passes the test. 
NotEqual Passes the test when the new pixel value does not equal to current pixel value. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web