Tuesday, May 15, 2007

GraphicsDeviceCapabilities.CompareCaps

Implemented CompareCaps a few days ago, which are exposed via the AlphaCompareCapabilities and DepthBufferCompareCapabilities.  These indicate the comparison operators supported for the alpha and depth buffers.  Their OpenGL equivalents are glAlphaFunc and glDepthFunc respectively.

The implementation was easy, since they were all supported since v1.0 of OpenGL and therefore just return true.

As per MSDN documentation,

Represents comparison capabilities.

Property OpenGL Extension or Minimum Version
SupportsAlways v1.0
SupportsEqual v1.0
SupportsGreater v1.0
SupportsGreaterEqual v1.0
SupportsLess v1.0
SupportsLessEqual v1.0
SupportsNever v1.0
SupportsNotEqual v1.0

No comments: