Class GorgonDepthStencilStateBuilder
A builder for a GorgonDepthStencilState object.
Inheritance
Implements
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public class GorgonDepthStencilStateBuilder : GorgonStateBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>, IGorgonFluentBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState, IGorgonAllocator<GorgonDepthStencilState>>, IGorgonFluentBuilder<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>
Remarks
Use this builder to create a new immutable GorgonDepthStencilState to pass to a GorgonPipelineState. This object provides a fluent interface to help build up a depth/stencil state.
This will define how rasterized primitive data is clipped against a depth/stencil buffer. Depth reading, writing, and stencil operations are affected by this state.
A depth/stencil state is an immutable object, and as such can only be created by using this object.
Constructors
| Edit this page View SourceGorgonDepthStencilStateBuilder()
Initializes a new instance of the GorgonDepthStencilStateBuilder class.
Declaration
public GorgonDepthStencilStateBuilder()
See Also
Methods
| Edit this page View SourceDepthComparison(Comparison)
Function to set the depth comparison.
Declaration
public GorgonDepthStencilStateBuilder DepthComparison(Comparison depthCompare)
Parameters
Type | Name | Description |
---|---|---|
Comparison | depthCompare | The comparison to type. |
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDepthDisabled()
Function to disable depth testing.
Declaration
public GorgonDepthStencilStateBuilder DepthDisabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDepthEnabled()
Function to enable depth testing.
Declaration
public GorgonDepthStencilStateBuilder DepthEnabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDepthWriteDisabled()
Function to disable depth writing.
Declaration
public GorgonDepthStencilStateBuilder DepthWriteDisabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDepthWriteEnabled()
Function to enable depth writing.
Declaration
public GorgonDepthStencilStateBuilder DepthWriteEnabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceOnClearState()
Function to clear the working state for the builder.
Declaration
protected override GorgonDepthStencilStateBuilder OnClearState()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
Overrides
See Also
| Edit this page View SourceOnCreateState()
Function to update the properties of the state from the working copy to the final copy.
Declaration
protected override GorgonDepthStencilState OnCreateState()
Returns
Type | Description |
---|---|
GorgonDepthStencilState | The fluent builder interface. |
Overrides
See Also
| Edit this page View SourceOnResetTo(GorgonDepthStencilState)
Function to reset the builder to the specified state.
Declaration
protected override GorgonDepthStencilStateBuilder OnResetTo(GorgonDepthStencilState state)
Parameters
Type | Name | Description |
---|---|---|
GorgonDepthStencilState | state | The state to copy from. |
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
Overrides
See Also
| Edit this page View SourceOnUpdate(GorgonDepthStencilState)
Function to update the properties of the state, allocated from an allocator, from the working copy.
Declaration
protected override void OnUpdate(GorgonDepthStencilState state)
Parameters
Type | Name | Description |
---|---|---|
GorgonDepthStencilState | state | The state to update. |
Overrides
See Also
| Edit this page View SourceStencilComparison(StencilFace, Comparison)
Function to set the comparison type for a stencil operation.
Declaration
public GorgonDepthStencilStateBuilder StencilComparison(StencilFace face, Comparison comparison)
Parameters
Type | Name | Description |
---|---|---|
StencilFace | face | The face direction for the operation. |
Comparison | comparison | The comparison type. |
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceStencilDisabled()
Function to disable stencil testing.
Declaration
public GorgonDepthStencilStateBuilder StencilDisabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceStencilEnabled()
Function to enable stencil testing.
Declaration
public GorgonDepthStencilStateBuilder StencilEnabled()
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceStencilMask(byte, byte)
Function to set the read/write mask for the stencil test.
Declaration
public GorgonDepthStencilStateBuilder StencilMask(byte read = 255, byte write = 255)
Parameters
Type | Name | Description |
---|---|---|
byte | read | [Optional] The read mask. |
byte | write | [Optional] The write mask. |
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceStencilOperation(StencilFace, StencilOperation, StencilOperation, StencilOperation)
Function to set the operation(s) for the stencil StencilComparison(StencilFace, Comparison) result.
Declaration
public GorgonDepthStencilStateBuilder StencilOperation(StencilFace face, StencilOperation passStencilOp = StencilOperation.Keep, StencilOperation failStencilOp = StencilOperation.Keep, StencilOperation depthFailOp = StencilOperation.Keep)
Parameters
Type | Name | Description |
---|---|---|
StencilFace | face | The face direction for the operation. |
StencilOperation | passStencilOp | [Optional] The stencil operation if the comparison passes. |
StencilOperation | failStencilOp | [Optional] The stencil operation if the comparison fails. |
StencilOperation | depthFailOp | [Optional] The stencil operation if the depth comparison fails. |
Returns
Type | Description |
---|---|
GorgonDepthStencilStateBuilder | The fluent builder interface. |