Freigeben über


Device.DepthStencilSurface Property

Gets or sets the depth stencil surface owned by the Device structure.

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

Syntax

'Declaration
Public ReadOnly Property DepthStencilSurface As Surface
'Usage
Dim instance As Device
Dim value As Surface

value = instance.DepthStencilSurface
public Surface DepthStencilSurface { get; }
public:
property Surface^ DepthStencilSurface {
    Surface^ get ();
}
/** @property */
public Surface get_DepthStencilSurface ()
public function get DepthStencilSurface () : Surface

Property Value

Returns a surface object that represents the depth stencil surface. If no depth stencil buffer is associated with the device, the return value is a null reference (Nothing in Visual Basic). Setting this value to a null reference (Nothing in Visual Basic) disables the depth stencil operation.

Exceptions

Exception type Condition

NotFoundException

The device does not have a depth stencil buffer associated with it.

InvalidCallException

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

Remarks

A buffer that contains stencil data. Stencil data is commonly used to mask drawing to particular screen pixels. The following restrictions apply when using this property:

  • The multisample type must be the same for the render target and the depth stencil surface.

  • The formats for the render target and depth stencil surface must be compatible. For more information, see CheckDepthStencilMatch.

  • The size of the depth stencil surface must be greater than or equal to the size of the render target.

These restrictions are validated only when using the debug runtime when any of the Device drawing methods are called.

.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