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.Int32The width of the depth stencil surface, in pixels.
height
Type: System.Int32The height of the depth stencil surface, in pixels.
format
Type: Microsoft.WindowsMobile.DirectX.Direct3D.DepthFormatA 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
Type: Microsoft.WindowsMobile.DirectX.Direct3D.MultiSampleTypeA 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
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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