DepthStencilBuffer Constructor (GraphicsDevice, Int32, Int32, DepthFormat, MultiSampleType, Int32)
Initializes a new instance of the DepthStencilBuffer class, specifying the multisample type and quality.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public DepthStencilBuffer (
GraphicsDevice graphicsDevice,
int width,
int height,
DepthFormat format,
MultiSampleType multiSampleType,
int multiSampleQuality
)
Parameters
- graphicsDevice
The graphics device that will display the depth stencil buffer. - width
Width, in pixels, of the depth stencil buffer. - height
Height, in pixels, of the depth stencil buffer. - format
The format of the data to be placed in this depth stencil buffer. - multiSampleType
The levels of full-scene multisampling that the device can apply. - multiSampleQuality
The number of quality stops available for a given multisample type.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | graphicsDevice is null. |
ArgumentOutOfRangeException | width and height are less than or equal to zero. width and height must be greater than zero. |
ArgumentException | One of the following conditions is true:
|
InvalidOperationException | Unable to create this DepthStencilBuffer resource. |
See Also
Reference
DepthStencilBuffer Class
DepthStencilBuffer Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista