Class GorgonStreamOutPipelineStateBuilder
A builder used to create pipeline render state objects.
Implements
Inherited Members
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 SourceGorgonStreamOutPipelineStateBuilder(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
Properties
| Edit this page View SourceGraphics
Property to return the graphics interface used to build the pipeline state.
Declaration
public GorgonGraphics Graphics { get; }
Property Value
Type | Description |
---|---|
GorgonGraphics |
See Also
Methods
| Edit this page View SourceBlendState(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 |
See Also
| Edit this page View SourceBlendStates(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 |
See Also
| Edit this page View SourceBuild()
Function to build a pipeline state.
Declaration
public GorgonStreamOutPipelineState Build()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineState | A new pipeline state. |
See Also
| Edit this page View SourceBuild(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
| Edit this page View SourceClear()
Function to clear the current pipeline state.
Declaration
public GorgonStreamOutPipelineStateBuilder Clear()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineStateBuilder | The fluent interface for the builder. |
See Also
| Edit this page View SourceDepthStencilState(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
| Edit this page View SourceDepthStencilState(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
| Edit this page View SourceDisableAlphaCoverage()
Function to disable alpha coverage for blending.
Declaration
public GorgonStreamOutPipelineStateBuilder DisableAlphaCoverage()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDisableIndependentBlending()
Function to disable independent render target blending
Declaration
public GorgonStreamOutPipelineStateBuilder DisableIndependentBlending()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceEnableAlphaCoverage()
Function to enable alpha coverage for blending.
Declaration
public GorgonStreamOutPipelineStateBuilder EnableAlphaCoverage()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceEnableIndependentBlending()
Function to enable independent render target blending.
Declaration
public GorgonStreamOutPipelineStateBuilder EnableIndependentBlending()
Returns
Type | Description |
---|---|
GorgonStreamOutPipelineStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourcePixelShader(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
| Edit this page View SourcePrimitiveType(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
| Edit this page View SourceRasterState(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
| Edit this page View SourceRasterState(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
| Edit this page View SourceResetTo(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
| Edit this page View SourceVertexShader(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. |