Device.DepthStencilSurface Property

Language:

Retrieves or sets the depth stencil surface owned by the Device object.

Definition

Visual Basic Public Property DepthStencilSurface As Surface
C# public Surface DepthStencilSurface { get; set; }
C++ public:
property Surface^ DepthStencilSurface {
        Surface^ get();
        void set(Surfacevalue);
}
JScript public function get DepthStencilSurface() : Surface
public function set DepthStencilSurface(Surface);

Property Value

Microsoft.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 null.

Setting this value to null disables the depth stencil operation.

This property is read/write. 

Remarks

The following restrictions apply when using this property.

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

Cube textures differ from other surfaces in that they are collections of surfaces. To set a new depth stencil surface with a cube texture, choose an individual face using CubeTexture.GetCubeMapSurface, and pass the resulting surface to this property.

Exceptions
NotFoundException Occurs if the device does not have a depth stencil buffer associated with it.
InvalidCallException Occurs if the method call is invalid. For example, a parameter may have an invalid value.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center