Gorgon
Show / Hide Table of Contents

Class GorgonDepthStencilStateBuilder

A builder for a GorgonDepthStencilState object.

Inheritance
object
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>
GorgonStateBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>
GorgonDepthStencilStateBuilder
Implements
IGorgonFluentBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState, IGorgonAllocator<GorgonDepthStencilState>>
IGorgonFluentBuilder<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>
Inherited Members
GorgonStateBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnUpdate(GorgonDepthStencilState)
GorgonStateBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.Build(IGorgonAllocator<GorgonDepthStencilState>)
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.WorkingState
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnCreateState()
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnResetTo(GorgonDepthStencilState)
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnClearState()
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.Build()
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.ResetTo(GorgonDepthStencilState)
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.Clear()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
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 Source

GorgonDepthStencilStateBuilder()

Initializes a new instance of the GorgonDepthStencilStateBuilder class.

Declaration
public GorgonDepthStencilStateBuilder()
See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState

Methods

| Edit this page View Source

DepthComparison(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
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

DepthDisabled()

Function to disable depth testing.

Declaration
public GorgonDepthStencilStateBuilder DepthDisabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

DepthEnabled()

Function to enable depth testing.

Declaration
public GorgonDepthStencilStateBuilder DepthEnabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

DepthWriteDisabled()

Function to disable depth writing.

Declaration
public GorgonDepthStencilStateBuilder DepthWriteDisabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

DepthWriteEnabled()

Function to enable depth writing.

Declaration
public GorgonDepthStencilStateBuilder DepthWriteEnabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

OnClearState()

Function to clear the working state for the builder.

Declaration
protected override GorgonDepthStencilStateBuilder OnClearState()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

Overrides
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnClearState()
See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

OnCreateState()

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
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnCreateState()
See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

OnResetTo(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
GorgonStateBuilderCommon<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnResetTo(GorgonDepthStencilState)
See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

OnUpdate(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
GorgonStateBuilderAllocator<GorgonDepthStencilStateBuilder, GorgonDepthStencilState>.OnUpdate(GorgonDepthStencilState)
See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

StencilComparison(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
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

StencilDisabled()

Function to disable stencil testing.

Declaration
public GorgonDepthStencilStateBuilder StencilDisabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

StencilEnabled()

Function to enable stencil testing.

Declaration
public GorgonDepthStencilStateBuilder StencilEnabled()
Returns
Type Description
GorgonDepthStencilStateBuilder

The fluent builder interface.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

StencilMask(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
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
| Edit this page View Source

StencilOperation(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.

See Also
GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState

Implements

IGorgonFluentBuilderAllocator<TB, TBo, TBa>
IGorgonFluentBuilder<TB, TBo>

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)

See Also

GorgonGraphics
GorgonPipelineState
GorgonDepthStencilState
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author