Manager.CheckDeviceFormat-Methode
Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]
Bestimmt, ob ein Oberflächenformat als der angegebene Ressourcentyp verfügbar ist und kann als eine Textur, Tiefenstencilpuffer, Ziel oder eine beliebige Kombination der drei auf einem Gerät, das den aktuellen Adapter darstellt Rendern verwendet werden.
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
)
static member CheckDeviceFormat :
adapter:int *
deviceType:DeviceType *
adapterFormat:Format *
usage:Usage *
resourceType:ResourceType *
checkFormat:Format -> bool
Parameter
- adapter
Typ: System.Int32
Ordinalzahl, die den Anzeigeadapter auf Abfrage.AdapterListCollection.Default ist immer die primäre Grafikkarte.
- deviceType
Typ: Microsoft.WindowsMobile.DirectX.Direct3D.DeviceType
Member der DeviceType-Enumeration, die den Gerätetyp identifiziert.
- adapterFormat
Typ: Microsoft.WindowsMobile.DirectX.Direct3D.Format
Member der Format-Enumeration, die das Format des Anzeigemodus identifiziert, in dem der Adapter versetzt wird.
- usage
Typ: Microsoft.WindowsMobile.DirectX.Direct3D.Usage
Syntax-Optionen für die Oberfläche angefordert.Syntax-Optionen sind eine beliebige Kombination Usage Enumerationswerte (nur eine Teilmenge der Verwendung Werte sind gültig für CheckDeviceFormat).Weitere Informationen finden Sie unter Usage.
- resourceType
Typ: Microsoft.WindowsMobile.DirectX.Direct3D.ResourceType
Ein ResourceType für die Verwendung mit dem abgefragten Format angefordert.
- checkFormat
Typ: Microsoft.WindowsMobile.DirectX.Direct3D.Format
Member der kennzeichnet das Format von Oberflächen, die verwendet werden können, wie definierten Formatusage-Enumeration.
Rückgabewert
Typ: System.Boolean
true , wenn die Methode erfolgreich ist;andernfalls false.
Beispiele
Das folgende Codebeispiel veranschaulicht das bestimmen, ob ein bestimmtes Texturformat auf einem Gerät unterstützt wird.
' check support for a Format.A16B16R16F render targetIfNot Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceFormat(0, DeviceType.Default, Format.A1R5G5B5, Usage.RenderTarget, ResourceType.BackBuffer, Format.A1R5G5B5) Then
MsgBox("Supported")
EndIf
// check support for a Format.A16B16R16F render targetif (!Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceFormat(0, DeviceType.Default, Format.A1R5G5B5,
Usage.RenderTarget, ResourceType.BackBuffer,
Format.A1R5G5B5))
MessageBox.Show("Supported");
.NET Framework-Sicherheit
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter Verwenden von Bibliotheken aus teilweise vertrauenswürdigem Code.
Plattformen
Windows CE, Windows Mobile für Smartphone, Windows Mobile für Pocket PC
Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.
Versionsinformationen
.NET Compact Framework
Unterstützt in: 3.5, 2.0