共用方式為


PresentationParameters.EnableAutoDepthStencil Property

Gets or sets a value indicating whether Direct3D will manage depth buffers for the application.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public bool EnableAutoDepthStencil { get; set; }

Property Value

true if Direct3D will manage depth buffers for the application; false otherwise.

Remarks

If EnableAutoDepthStencil is true, the device will create a depth-stencil buffer when it is created. The depth-stencil buffer will be automatically set as the render target of the device. When the device is reset, the depth-stencil buffer will be automatically destroyed and recreated in the new size.

If EnableAutoDepthStencil is true, then AutoDepthStencilFormat must be a valid depth-stencil format.

See Also

Reference

PresentationParameters Class
PresentationParameters Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista