Device.DepthStencilSurface Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
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
Get
'Usage
Dim instance As Device
Dim value As Surface
value = instance.DepthStencilSurface
public Surface DepthStencilSurface { get; }
public:
property Surface^ DepthStencilSurface {
Surface^ get ();
}
member DepthStencilSurface : Surface
Property Value
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Surface
Returns a surface object that represents the depth stencil surface. If no depth stencil buffer is associated with the device, the return value is nulla null reference (Nothing in Visual Basic).
Setting this value to nulla null reference (Nothing in Visual Basic) disables the depth stencil operation.
Exceptions
Exception | 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
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 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