Sdílet prostřednictvím


GraphicsAdapter.CheckDeviceFormat Method (DeviceType, SurfaceFormat, ResourceUsage, QueryUsages, ResourceType, SurfaceFormat)

Verifies whether a surface 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,
         SurfaceFormat 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 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

See Also

Concepts

Xbox 360 Surface Formats

Reference

GraphicsAdapter Class
GraphicsAdapter Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista