GraphicsAdapter.CheckDepthStencilMatch Method
Tests whether a depth stencil format is compatible with a render target format in a particular display mode.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public bool CheckDepthStencilMatch (
DeviceType deviceType,
SurfaceFormat adapterFormat,
SurfaceFormat renderTargetFormat,
DepthFormat depthStencilFormat
)
Parameters
- deviceType
The device type. - adapterFormat
The format of the display mode into which the adapter will be placed. - renderTargetFormat
The format of the render-target surface to be tested. - depthStencilFormat
The format of the depth stencil surface to be tested.
Return Value
true if the format is compatible; false otherwise.
Exceptions
Exception type | Condition |
---|---|
DeviceNotSupportedException | (Xbox 360) Hardware is the only device type supported on this platform. |
Remarks
CheckDepthStencilMatch enables applications to work with hardware that requires that certain depth formats work only with certain render target formats.
Note
The following surface formats are not supported on the Xbox 360 platform for any ResourceType, including textures:
See Also
Concepts
Reference
GraphicsAdapter Class
GraphicsAdapter Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista