Manager.CheckDepthStencilMatch, méthode
Mise à jour : novembre 2007
Détermine si un format de stencil de profondeur est compatible avec un format cible de rendu dans un mode d'affichage particulier.
Espace de noms : Microsoft.WindowsMobile.DirectX.Direct3D
Assembly : Microsoft.WindowsMobile.DirectX (dans Microsoft.WindowsMobile.DirectX.dll)
Syntaxe
'Déclaration
Public Shared Function CheckDepthStencilMatch ( _
adapter As Integer, _
deviceType As DeviceType, _
adapterFormat As Format, _
renderTargetFormat As Format, _
depthStencilFormat As DepthFormat _
) As Boolean
'Utilisation
Dim adapter As Integer
Dim deviceType As DeviceType
Dim adapterFormat As Format
Dim renderTargetFormat As Format
Dim depthStencilFormat As DepthFormat
Dim returnValue As Boolean
returnValue = Manager.CheckDepthStencilMatch(adapter, _
deviceType, adapterFormat, renderTargetFormat, _
depthStencilFormat)
public static bool CheckDepthStencilMatch(
int adapter,
DeviceType deviceType,
Format adapterFormat,
Format renderTargetFormat,
DepthFormat depthStencilFormat
)
public:
static bool CheckDepthStencilMatch(
int adapter,
DeviceType deviceType,
Format adapterFormat,
Format renderTargetFormat,
DepthFormat depthStencilFormat
)
public static function CheckDepthStencilMatch(
adapter : int,
deviceType : DeviceType,
adapterFormat : Format,
renderTargetFormat : Format,
depthStencilFormat : DepthFormat
) : boolean
Paramètres
adapter
Type : System.Int32Nombre ordinal qui dénote la carte vidéo à interroger. AdapterListCollection.Default est toujours la carte vidéo principale.
deviceType
Type : Microsoft.WindowsMobile.DirectX.Direct3D.DeviceTypeMembre de l'énumération DeviceType qui identifie le type de périphérique.
adapterFormat
Type : Microsoft.WindowsMobile.DirectX.Direct3D.FormatMembre de l'énumération Format qui identifie le format du mode d'affichage dans lequel la carte sera placée.
renderTargetFormat
Type : Microsoft.WindowsMobile.DirectX.Direct3D.FormatMembre de l'énumération Format qui identifie le format de la surface cible de rendu à tester.
depthStencilFormat
Type : Microsoft.WindowsMobile.DirectX.Direct3D.DepthFormatMembre de l'énumération DepthFormat qui identifie le format de la surface du stencil de profondeur à tester.
Valeur de retour
Type : System.Boolean
true si la méthode a réussi ; sinon false.
Notes
La méthode CheckDepthStencilMatch permet aux applications de travailler avec du matériel qui requiert que certains formats de profondeur n'utilisent que certains formats cibles de rendu.
Exemples
L'exemple de code suivant montre comment utiliser la méthode CheckDeviceFormat pour valider un format de stencil de profondeur.
' 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");
Autorisations
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, consultez Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.
Plateformes
Windows CE, Windows Mobile pour Smartphone, Windows Mobile pour Pocket PC
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Compact Framework
Pris en charge dans : 3.5, 2.0