GraphicsAdapter.CheckDeviceFormat Method (DeviceType, SurfaceFormat, ResourceUsage, QueryUsages, ResourceType, DepthFormat)
Verifies whether a depth buffer format is available as a specified resource type and can be used as a texture, depth-stencil buffer, render target, or any combination of the three, on a device representing the current adapter.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public bool CheckDeviceFormat (
DeviceType deviceType,
SurfaceFormat adapterFormat,
ResourceUsage usage,
QueryUsages queryUsages,
ResourceType resourceType,
DepthFormat checkFormat
)
Parameters
- deviceType
The type of device to check. - adapterFormat
The format of the display mode into which the adapter will be placed. - usage
A set of options identifying the behaviors of this surface resource. - queryUsages
The type of query to issue. - resourceType
A resource type requested for use with the queried format. - checkFormat
The format of the depth buffer surface identified by usage.
Return Value
true if the surface format is available as the specified resource and format type; false otherwise.
Exceptions
Exception type | Condition |
---|---|
DeviceNotSupportedException | (Xbox 360) Hardware is the only device type supported on this platform. |
Remarks
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