Freigeben über


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 Surface CreateDepthStencilSurface (
    int width, 
    int height, 
    DepthFormat format, 
    MultiSampleType multiSampleType
)
public function CreateDepthStencilSurface (
    width : int, 
    height : int, 
    format : DepthFormat, 
    multiSampleType : MultiSampleType
) : Surface

Parameters

  • width
    The width of the depth stencil surface in pixels.
  • height
    The height of the depth stencil surface in pixels.
  • format
    A member of the DepthFormat enumerated type that describes the format of the depth stencil surface. This value must be one of the enumerated depth stencil formats for the current device.
  • multiSampleType
    A member of the MultiSampleType enumerated type that describes the multisampling buffer type. This value must be one of the supported multisample types when this surface is passed to the DepthStencilSurface set by SetRenderTarget.

Return Value

A Surface that represents the created depth stencil surface resource.

Exceptions

Exception type 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

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Platforms

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

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

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace