Partager via


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

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

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

Voir aussi

Référence

Manager, classe

Membres Manager

Microsoft.WindowsMobile.DirectX.Direct3D, espace de noms