Share via


Device.CreateDepthStencilSurface Method

Creates a depth stencil resource.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Function CreateDepthStencilSurface ( _
    width As Integer, _
    height As Integer, _
    format As DepthFormat, _
    multiSampleType As MultiSampleType _
) As Surface
'Usage
Dim instance As Device 
Dim width As Integer 
Dim height As Integer 
Dim format As DepthFormat 
Dim multiSampleType As MultiSampleType 
Dim returnValue As Surface 

returnValue = instance.CreateDepthStencilSurface(width, _
    height, format, multiSampleType)
public Surface CreateDepthStencilSurface(
    int width,
    int height,
    DepthFormat format,
    MultiSampleType multiSampleType
)
public:
Surface^ CreateDepthStencilSurface(
    int width, 
    int height, 
    DepthFormat format, 
    MultiSampleType multiSampleType
)
public function CreateDepthStencilSurface(
    width : int, 
    height : int, 
    format : DepthFormat, 
    multiSampleType : MultiSampleType
) : Surface

Parameters

  • width
    Type: System.Int32

    The width of the depth stencil surface, in pixels.

  • height
    Type: System.Int32

    The height of the depth stencil surface, in pixels.

Return Value

Type: Microsoft.WindowsMobile.DirectX.Direct3D.Surface
A Surface that represents the created depth stencil surface resource.

Exceptions

Exception Condition
NotAvailableException

The current device does not support the queried multisample type.

InvalidCallException

The method call is invalid. For example, a parameter might contain an invalid value.

OutOfMemoryException

Direct3D has insufficient memory to complete the call.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace