Struct D3D11DepthStencilDesc
Describes depth-stencil state.
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11DepthStencilDesc : IEquatable<D3D11DepthStencilDesc>
Constructors
|
Edit this page
View Source
D3D11DepthStencilDesc(bool, D3D11DepthWriteMask, D3D11ComparisonFunction, bool, byte, byte, D3D11StencilOperation, D3D11StencilOperation, D3D11StencilOperation, D3D11ComparisonFunction, D3D11StencilOperation, D3D11StencilOperation, D3D11StencilOperation, D3D11ComparisonFunction)
Declaration
public D3D11DepthStencilDesc(bool isDepthEnabled, D3D11DepthWriteMask depthWriteMask, D3D11ComparisonFunction depthFunction, bool isStencilEnabled, byte stencilReadMask, byte stencilWriteMask, D3D11StencilOperation frontStencilFailOperation, D3D11StencilOperation frontStencilDepthFailOperation, D3D11StencilOperation frontStencilPassOperation, D3D11ComparisonFunction frontStencilFunction, D3D11StencilOperation backStencilFailOperation, D3D11StencilOperation backStencilDepthFailOperation, D3D11StencilOperation backStencilPassOperation, D3D11ComparisonFunction backStencilFunction)
Parameters
| Type |
Name |
Description |
| bool |
isDepthEnabled |
Enable depth testing.
|
| D3D11DepthWriteMask |
depthWriteMask |
Identify a portion of the depth-stencil buffer that can be modified by depth data.
|
| D3D11ComparisonFunction |
depthFunction |
A function that compares depth data against existing depth data.
|
| bool |
isStencilEnabled |
Enable stencil testing.
|
| byte |
stencilReadMask |
Identify a portion of the depth-stencil buffer for reading stencil data.
|
| byte |
stencilWriteMask |
Identify a portion of the depth-stencil buffer for writing stencil data.
|
| D3D11StencilOperation |
frontStencilFailOperation |
The stencil operation to perform when stencil testing fails for pixels whose surface normal is facing towards the camera.
|
| D3D11StencilOperation |
frontStencilDepthFailOperation |
The stencil operation to perform when stencil testing passes and depth testing fails for pixels whose surface normal is facing towards the camera.
|
| D3D11StencilOperation |
frontStencilPassOperation |
The stencil operation to perform when stencil testing and depth testing both pass for pixels whose surface normal is facing towards the camera.
|
| D3D11ComparisonFunction |
frontStencilFunction |
A function that compares stencil data against existing stencil data for pixels whose surface normal is facing towards the camera.
|
| D3D11StencilOperation |
backStencilFailOperation |
The stencil operation to perform when stencil testing fails for pixels whose surface normal is facing away from the camera.
|
| D3D11StencilOperation |
backStencilDepthFailOperation |
The stencil operation to perform when stencil testing passes and depth testing fails for pixels whose surface normal is facing away from the camera.
|
| D3D11StencilOperation |
backStencilPassOperation |
The stencil operation to perform when stencil testing and depth testing both pass for pixels whose surface normal is facing away from the camera.
|
| D3D11ComparisonFunction |
backStencilFunction |
A function that compares stencil data against existing stencil data for pixels whose surface normal is facing away from the camera.
|
Properties
|
Edit this page
View Source
BackFace
Gets or sets a value indicating how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera.
Declaration
public D3D11DepthStencilOperationDesc BackFace { get; set; }
Property Value
|
Edit this page
View Source
Default
Gets default depth-stencil-state values
Declaration
public static D3D11DepthStencilDesc Default { get; }
Property Value
|
Edit this page
View Source
DepthFunction
Gets or sets a function that compares depth data against existing depth data.
Declaration
public D3D11ComparisonFunction DepthFunction { get; set; }
Property Value
|
Edit this page
View Source
DepthWriteMask
Gets or sets a portion of the depth-stencil buffer that can be modified by depth data.
Declaration
public D3D11DepthWriteMask DepthWriteMask { get; set; }
Property Value
|
Edit this page
View Source
FrontFace
Gets or sets a value indicating how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera.
Declaration
public D3D11DepthStencilOperationDesc FrontFace { get; set; }
Property Value
|
Edit this page
View Source
IsDepthEnabled
Gets or sets a value indicating whether depth testing is enabled.
Declaration
public bool IsDepthEnabled { get; set; }
Property Value
|
Edit this page
View Source
IsStencilEnabled
Gets or sets a value indicating whether stencil testing is enabled.
Declaration
public bool IsStencilEnabled { get; set; }
Property Value
|
Edit this page
View Source
StencilReadMask
Gets or sets a portion of the depth-stencil buffer for reading stencil data.
Declaration
public byte StencilReadMask { get; set; }
Property Value
|
Edit this page
View Source
StencilWriteMask
Gets or sets a portion of the depth-stencil buffer for writing stencil data.
Declaration
public byte StencilWriteMask { get; set; }
Property Value
Methods
|
Edit this page
View Source
Equals(D3D11DepthStencilDesc)
Declaration
public readonly bool Equals(D3D11DepthStencilDesc other)
Parameters
Returns
|
Edit this page
View Source
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
NativeReadFrom(nint)
Declaration
public static D3D11DepthStencilDesc NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<D3D11DepthStencilDesc>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11DepthStencilDesc> objects)
Parameters
|
Edit this page
View Source
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
|
Edit this page
View Source
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
|
Returns
|
Edit this page
View Source
NativeWriteTo(nint, in D3D11DepthStencilDesc)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11DepthStencilDesc obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<D3D11DepthStencilDesc>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11DepthStencilDesc> objects)
Parameters
Operators
|
Edit this page
View Source
operator ==(D3D11DepthStencilDesc, D3D11DepthStencilDesc)
Declaration
public static bool operator ==(D3D11DepthStencilDesc left, D3D11DepthStencilDesc right)
Parameters
Returns
|
Edit this page
View Source
operator !=(D3D11DepthStencilDesc, D3D11DepthStencilDesc)
Declaration
public static bool operator !=(D3D11DepthStencilDesc left, D3D11DepthStencilDesc right)
Parameters
Returns
Implements