Manager.CheckDepthStencilMatch Method
Determines whether a depth stencil format is compatible with a render target format in a particular display mode.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Shared Function CheckDepthStencilMatch ( _
adapter As Integer, _
deviceType As DeviceType, _
adapterFormat As Format, _
renderTargetFormat As Format, _
depthStencilFormat As DepthFormat _
) As Boolean
'Usage
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 boolean 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
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.
- renderTargetFormat
Member of the Format enumeration that identifies the format of the render target surface to be tested.
- depthStencilFormat
Member of the DepthFormat enumeration that identifies the format of the depth stencil surface to be tested.
Return Value
true if the method succeeds; otherwise, false.
Remarks
The CheckDepthStencilMatch method enables applications to work with hardware that requires that certain depth formats work only with certain render target formats.
Example
The following code example shows how to use CheckDeviceFormat method to validate a depth stencil format.
' 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