Struct D3D11DepthStencilViewDesc
Specifies the subresources of a texture that are accessible from a depth-stencil view.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
[SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", MessageId = "texture2DMsArray", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", MessageId = "texture2DArray", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Portability", "CA1900:ValueTypeFieldsShouldBePortable", MessageId = "texture1DArray", Justification = "Reviewed")]
public struct D3D11DepthStencilViewDesc : IEquatable<D3D11DepthStencilViewDesc>
Constructors
| Edit this page View SourceD3D11DepthStencilViewDesc(D3D11DsvDimension)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
D3D11DepthStencilViewDesc(D3D11DsvDimension, DxgiFormat)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension, DxgiFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
D3D11DepthStencilViewDesc(D3D11DsvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
D3D11DepthStencilViewDesc(D3D11DsvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11DepthStencilViewDesc(D3D11DsvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
D3D11DepthStencilViewDesc(D3D11DsvDimension, DxgiFormat, uint, uint, uint, D3D11DepthStencilViewOptions)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize, D3D11DepthStencilViewOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
| D3D11DepthStencilViewOptions | options | A value that describes whether the texture is read only. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension, DxgiFormat)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension, DxgiFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
D3D11DepthStencilViewDesc(D3D11Texture1D, D3D11DsvDimension, DxgiFormat, uint, uint, uint, D3D11DepthStencilViewOptions)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture1D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize, D3D11DepthStencilViewOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
| D3D11DepthStencilViewOptions | options | A value that describes whether the texture is read only. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension, DxgiFormat)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension, DxgiFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
D3D11DepthStencilViewDesc(D3D11Texture2D, D3D11DsvDimension, DxgiFormat, uint, uint, uint, D3D11DepthStencilViewOptions)
Initializes a new instance of the D3D11DepthStencilViewDesc struct.
Declaration
public D3D11DepthStencilViewDesc(D3D11Texture2D texture, D3D11DsvDimension viewDimension, DxgiFormat format, uint mipSlice, uint firstArraySlice, uint arraySize, D3D11DepthStencilViewOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11DsvDimension | viewDimension | The depth-stencil type of the view. |
| DxgiFormat | format | The viewing format. |
| uint | mipSlice | The index of the mipmap level to use mip slice. |
| uint | firstArraySlice | The index of the first element to use in an array of elements. |
| uint | arraySize | The number of elements in the array. |
| D3D11DepthStencilViewOptions | options | A value that describes whether the texture is read only. |
Properties
| Edit this page View SourceFormat
Gets or sets the resource data format.
Declaration
public DxgiFormat Format { get; set; }
Property Value
| Type | Description |
|---|---|
| DxgiFormat |
Options
Gets or sets a value that describes whether the texture is read only.
Declaration
public D3D11DepthStencilViewOptions Options { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11DepthStencilViewOptions |
Texture1D
Gets or sets a 1D texture subresource.
Declaration
public D3D11Texture1DDsv Texture1D { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture1DDsv |
Texture1DArray
Gets or sets an array of 1D texture subresources.
Declaration
public D3D11Texture1DArrayDsv Texture1DArray { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture1DArrayDsv |
Texture2D
Gets or sets a 2D texture subresource.
Declaration
public D3D11Texture2DDsv Texture2D { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture2DDsv |
Texture2DArray
Gets or sets an array of 2D texture subresources.
Declaration
public D3D11Texture2DArrayDsv Texture2DArray { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture2DArrayDsv |
Texture2DMs
Gets or sets a multisampled 2D texture.
Declaration
public D3D11Texture2DMsDsv Texture2DMs { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture2DMsDsv |
Texture2DMsArray
Gets or sets an array of multisampled 2D textures.
Declaration
public D3D11Texture2DMsArrayDsv Texture2DMsArray { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Texture2DMsArrayDsv |
ViewDimension
Gets or sets the type of resource. Specifies how a depth-stencil resource will be accessed; the value is stored in the union in this structure.
Declaration
public D3D11DsvDimension ViewDimension { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11DsvDimension |
Methods
| Edit this page View SourceEquals(D3D11DepthStencilViewDesc)
Declaration
public readonly bool Equals(D3D11DepthStencilViewDesc other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DepthStencilViewDesc | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceNativeReadFrom(nint)
Declaration
public static D3D11DepthStencilViewDesc NativeReadFrom(nint buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer |
Returns
| Type | Description |
|---|---|
| D3D11DepthStencilViewDesc |
NativeReadFrom(nint, Span<D3D11DepthStencilViewDesc>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11DepthStencilViewDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| Span<D3D11DepthStencilViewDesc> | objects |
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
| Type | Description |
|---|---|
| int |
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count |
Returns
| Type | Description |
|---|---|
| int |
NativeWriteTo(nint, in D3D11DepthStencilViewDesc)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11DepthStencilViewDesc obj)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| D3D11DepthStencilViewDesc | obj |
NativeWriteTo(nint, ReadOnlySpan<D3D11DepthStencilViewDesc>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11DepthStencilViewDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| ReadOnlySpan<D3D11DepthStencilViewDesc> | objects |
Operators
| Edit this page View Sourceoperator ==(D3D11DepthStencilViewDesc, D3D11DepthStencilViewDesc)
Declaration
public static bool operator ==(D3D11DepthStencilViewDesc left, D3D11DepthStencilViewDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DepthStencilViewDesc | left | |
| D3D11DepthStencilViewDesc | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11DepthStencilViewDesc, D3D11DepthStencilViewDesc)
Declaration
public static bool operator !=(D3D11DepthStencilViewDesc left, D3D11DepthStencilViewDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DepthStencilViewDesc | left | |
| D3D11DepthStencilViewDesc | right |
Returns
| Type | Description |
|---|---|
| bool |