Gorgon
Show / Hide Table of Contents

Class GorgonStreamOutPipelineStateBuilder

A builder used to create pipeline render state objects.

Inheritance
object
GorgonStreamOutPipelineStateBuilder
Implements
IGorgonGraphicsObject
IGorgonFluentBuilderAllocator<GorgonStreamOutPipelineStateBuilder, GorgonStreamOutPipelineState, IGorgonAllocator<GorgonStreamOutPipelineState>>
IGorgonFluentBuilder<GorgonStreamOutPipelineStateBuilder, GorgonStreamOutPipelineState>
Inherited Members
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 GorgonStreamOutPipelineStateBuilder : IGorgonGraphicsObject, IGorgonFluentBuilderAllocator<GorgonStreamOutPipelineStateBuilder, GorgonStreamOutPipelineState, IGorgonAllocator<GorgonStreamOutPipelineState>>, IGorgonFluentBuilder<GorgonStreamOutPipelineStateBuilder, GorgonStreamOutPipelineState>
Remarks

Use this builder to create an immutable GorgonStreamOutPipelineState. This object will provide a fluent interface to build up the pipeline state.

A pipeline state object is used to define the state of the pipeline prior to drawing anything. It can be used to assign shaders, and various other states that will affect how data is rasterized on the GPU.

This pipeline state is similar to a GorgonPipelineState, except that it only contains the necessary states that it can use when rendering a stream out buffer.

The pipeline state object is immutable, and as such cannot be changed directly. To create a new pipeline state object, this object must be used.

Pipeline states are assigned to a GorgonStreamOutCall.

Constructors

| Edit this page View Source

GorgonStreamOutPipelineStateBuilder(GorgonGraphics)

Initializes a new instance of the GorgonStreamOutPipelineStateBuilder class.

Declaration
public GorgonStreamOutPipelineStateBuilder(GorgonGraphics graphics)
Parameters
Type Name Description
GorgonGraphics graphics

The graphics object that will build the pipeline state.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState

Properties

| Edit this page View Source

Graphics

Property to return the graphics interface used to build the pipeline state.

Declaration
public GorgonGraphics Graphics { get; }
Property Value
Type Description
GorgonGraphics
See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState

Methods

| Edit this page View Source

BlendState(GorgonBlendState, int)

Function to assign a GorgonBlendState to the pipeline.

Declaration
public GorgonStreamOutPipelineStateBuilder BlendState(GorgonBlendState state, int slot = 0)
Parameters
Type Name Description
GorgonBlendState state

The state to apply to the pipeline

int slot

[Optional] The slot to assign the states into.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

Exceptions
Type Condition
ArgumentNullException

Thrown when the slot is less than 0, or greater than/equal to 8.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

BlendStates(IReadOnlyList<GorgonBlendState>, int)

Function to assign a list of GorgonBlendState objects to the pipeline.

Declaration
public GorgonStreamOutPipelineStateBuilder BlendStates(IReadOnlyList<GorgonBlendState> states, int startSlot = 0)
Parameters
Type Name Description
IReadOnlyList<GorgonBlendState> states

The states to apply to the pipeline

int startSlot

[Optional] The first slot to assign the states into.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

Exceptions
Type Condition
ArgumentNullException

Thrown when the startSlot is less than 0, or greater than/equal to 8.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

Build()

Function to build a pipeline state.

Declaration
public GorgonStreamOutPipelineState Build()
Returns
Type Description
GorgonStreamOutPipelineState

A new pipeline state.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

Build(IGorgonAllocator<GorgonStreamOutPipelineState>)

Function to build a pipeline state.

Declaration
public GorgonStreamOutPipelineState Build(IGorgonAllocator<GorgonStreamOutPipelineState> allocator)
Parameters
Type Name Description
IGorgonAllocator<GorgonStreamOutPipelineState> allocator

The allocator used to create an instance of the object

Returns
Type Description
GorgonStreamOutPipelineState

The object created or updated by this builder.

Remarks

Using an allocator can provide different strategies when building objects. If omitted, the object will be created using the standard new keyword.

A custom allocator can be beneficial because it allows us to use a pool for allocating the objects, and thus allows for recycling of objects. This keeps the garbage collector happy by keeping objects around for as long as we need them, instead of creating objects that can potentially end up in the large object heap or in Gen 2.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

Clear()

Function to clear the current pipeline state.

Declaration
public GorgonStreamOutPipelineStateBuilder Clear()
Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for the builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

DepthStencilState(GorgonDepthStencilState)

Function to add a depth/stencil state to this pipeline state.

Declaration
public GorgonStreamOutPipelineStateBuilder DepthStencilState(GorgonDepthStencilState state)
Parameters
Type Name Description
GorgonDepthStencilState state

The depth/stencil state to apply.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

DepthStencilState(GorgonDepthStencilStateBuilder)

Function to add a depth/stencil state to this pipeline state.

Declaration
public GorgonStreamOutPipelineStateBuilder DepthStencilState(GorgonDepthStencilStateBuilder state)
Parameters
Type Name Description
GorgonDepthStencilStateBuilder state

The depth/stencil state to apply.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

DisableAlphaCoverage()

Function to disable alpha coverage for blending.

Declaration
public GorgonStreamOutPipelineStateBuilder DisableAlphaCoverage()
Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

DisableIndependentBlending()

Function to disable independent render target blending

Declaration
public GorgonStreamOutPipelineStateBuilder DisableIndependentBlending()
Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

EnableAlphaCoverage()

Function to enable alpha coverage for blending.

Declaration
public GorgonStreamOutPipelineStateBuilder EnableAlphaCoverage()
Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

EnableIndependentBlending()

Function to enable independent render target blending.

Declaration
public GorgonStreamOutPipelineStateBuilder EnableIndependentBlending()
Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

PixelShader(GorgonPixelShader)

Function to set the current pixel shader on the pipeline.

Declaration
public GorgonStreamOutPipelineStateBuilder PixelShader(GorgonPixelShader pixelShader)
Parameters
Type Name Description
GorgonPixelShader pixelShader

The pixel shader to assign.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

PrimitiveType(PrimitiveType)

Function to set primitive topology for the draw call.

Declaration
public GorgonStreamOutPipelineStateBuilder PrimitiveType(PrimitiveType primitiveType)
Parameters
Type Name Description
PrimitiveType primitiveType

The type of primitive to render.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent builder interface.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

RasterState(GorgonRasterState)

Function to add a rasterizer state to this pipeline state.

Declaration
public GorgonStreamOutPipelineStateBuilder RasterState(GorgonRasterState state)
Parameters
Type Name Description
GorgonRasterState state

The rasterizer state to apply.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

RasterState(GorgonRasterStateBuilder)

Function to add a rasterizer state to this pipeline state.

Declaration
public GorgonStreamOutPipelineStateBuilder RasterState(GorgonRasterStateBuilder state)
Parameters
Type Name Description
GorgonRasterStateBuilder state

The rasterizer state to apply.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

ResetTo(GorgonStreamOutPipelineState)

Function to reset the pipeline state to the specified state passed in to the method.

Declaration
public GorgonStreamOutPipelineStateBuilder ResetTo(GorgonStreamOutPipelineState pipeState)
Parameters
Type Name Description
GorgonStreamOutPipelineState pipeState

The pipeline state to copy.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for the builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
| Edit this page View Source

VertexShader(GorgonVertexShader)

Function to set the current vertex shader on the pipeline.

Declaration
public GorgonStreamOutPipelineStateBuilder VertexShader(GorgonVertexShader vertexShader)
Parameters
Type Name Description
GorgonVertexShader vertexShader

The vertex shader to assign.

Returns
Type Description
GorgonStreamOutPipelineStateBuilder

The fluent interface for this builder.

See Also
GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState

Implements

IGorgonGraphicsObject
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

GorgonPipelineStateBuilder
GorgonPipelineState
GorgonStreamOutCall
GorgonStreamOutPipelineState
  • 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