Manager.CheckDeviceFormat Method
Determines whether a surface 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.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Shared Function CheckDeviceFormat ( _
adapter As Integer, _
deviceType As DeviceType, _
adapterFormat As Format, _
usage As Usage, _
resourceType As ResourceType, _
checkFormat As Format _
) As Boolean
'Usage
Dim adapter As Integer
Dim deviceType As DeviceType
Dim adapterFormat As Format
Dim usage As Usage
Dim resourceType As ResourceType
Dim checkFormat As Format
Dim returnValue As Boolean
returnValue = Manager.CheckDeviceFormat(adapter, deviceType, adapterFormat, usage, resourceType, checkFormat)
public static bool CheckDeviceFormat (
int adapter,
DeviceType deviceType,
Format adapterFormat,
Usage usage,
ResourceType resourceType,
Format checkFormat
)
public:
static bool CheckDeviceFormat (
int adapter,
DeviceType deviceType,
Format adapterFormat,
Usage usage,
ResourceType resourceType,
Format checkFormat
)
public static boolean CheckDeviceFormat (
int adapter,
DeviceType deviceType,
Format adapterFormat,
Usage usage,
ResourceType resourceType,
Format checkFormat
)
public static function CheckDeviceFormat (
adapter : int,
deviceType : DeviceType,
adapterFormat : Format,
usage : Usage,
resourceType : ResourceType,
checkFormat : Format
) : boolean
Not applicable.
Parameters
- adapter
Ordinal number that denotes the display adapter to query. AdapterListCollection.Default is always the primary display adapter.
- deviceType
Member of the DeviceType enumeration that identifies the device type.
- adapterFormat
Member of the Format enumeration that identifies the format of the display mode into which the adapter will be placed.
- usage
Requested usage options for the surface. Usage options are any combination of Usage enumeration values (only a subset of the Usage values are valid for CheckDeviceFormat). For more information, see Usage .
- resourceType
A ResourceType requested for use with the queried format.
- checkFormat
Member of the Format enumeration that identifies the format of the surfaces that can be used, as defined by usage.
Return Value
true if the method succeeds; otherwise, false.
Example
The following code example shows how to determine whether a specific texture format is supported on a device.
' check support for a Format.A16B16R16F render target
If Not Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceFormat(0, DeviceType.Default, Format.A1R5G5B5, Usage.RenderTarget, ResourceType.BackBuffer, Format.A1R5G5B5) Then
MsgBox("Supported")
End If
// check support for a Format.A16B16R16F render target
if (!Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceFormat(0, DeviceType.Default, Format.A1R5G5B5,
Usage.RenderTarget, ResourceType.BackBuffer,
Format.A1R5G5B5))
MessageBox.Show("Supported");
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Manager Class
Manager Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace