Class GorgonBlendStateBuilder
A builder for a GorgonBlendState object.
Inheritance
Implements
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public class GorgonBlendStateBuilder : GorgonStateBuilderAllocator<GorgonBlendStateBuilder, GorgonBlendState>, IGorgonFluentBuilderAllocator<GorgonBlendStateBuilder, GorgonBlendState, IGorgonAllocator<GorgonBlendState>>, IGorgonFluentBuilder<GorgonBlendStateBuilder, GorgonBlendState>
Remarks
Use this builder to create a new immutable GorgonBlendState to pass to a GorgonPipelineState. This object provides a fluent interface to help build up a blend state.
A blend state will define how rasterized data is blended with the current render target(s). The ability to disable blending, define how blending operations are performed, etc... are all done through this state. This state also defines how blending is performed between adjacent render target(s) in the RenderTargets. This is controlled by the IsIndependentBlendingEnabled flag on the GorgonPipelineState object.
A blend state is an immutable object, and as such can only be created by using this object.
Constructors
| Edit this page View SourceGorgonBlendStateBuilder()
Initializes a new instance of the GorgonBlendStateBuilder class.
Declaration
public GorgonBlendStateBuilder()
See Also
Methods
| Edit this page View SourceBlendOperation(BlendOperation?, BlendOperation?)
Function to set the color, and alpha blend operations.
Declaration
public GorgonBlendStateBuilder BlendOperation(BlendOperation? color = null, BlendOperation? alpha = null)
Parameters
Type | Name | Description |
---|---|---|
BlendOperation? | color | [Optional] The color blend operation to assign. |
BlendOperation? | alpha | [Optional] The alpha blend operation to assign. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDestinationBlend(Blend?, Blend?)
Function to set the color, and alpha destination blend operation.
Declaration
public GorgonBlendStateBuilder DestinationBlend(Blend? color = null, Blend? alpha = null)
Parameters
Type | Name | Description |
---|---|---|
Blend? | color | [Optional] The color blend operation to assign. |
Blend? | alpha | [Optional] The alpha blend operation to assign. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceDisableBlending()
Function to disable blending.
Declaration
public GorgonBlendStateBuilder DisableBlending()
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceEnableBlending()
Function to enable blending.
Declaration
public GorgonBlendStateBuilder EnableBlending()
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceLogicOperation(LogicOperation)
Function to set the logical blending operation.
Declaration
public GorgonBlendStateBuilder LogicOperation(LogicOperation logicOperation)
Parameters
Type | Name | Description |
---|---|---|
LogicOperation | logicOperation | The operation to perform. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceOnClearState()
Function to clear the working state for the builder.
Declaration
protected override GorgonBlendStateBuilder OnClearState()
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | 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 GorgonBlendState OnCreateState()
Returns
Type | Description |
---|---|
GorgonBlendState | The fluent builder interface. |
Overrides
See Also
| Edit this page View SourceOnResetTo(GorgonBlendState)
Function to reset the builder to the specified state.
Declaration
protected override GorgonBlendStateBuilder OnResetTo(GorgonBlendState state)
Parameters
Type | Name | Description |
---|---|---|
GorgonBlendState | state | The state to copy from. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
Overrides
See Also
| Edit this page View SourceOnUpdate(GorgonBlendState)
Function to update the properties of the state, allocated from an allocator, from the working copy.
Declaration
protected override void OnUpdate(GorgonBlendState state)
Parameters
Type | Name | Description |
---|---|---|
GorgonBlendState | state | The state to update. |
Overrides
See Also
| Edit this page View SourceSourceBlend(Blend?, Blend?)
Function to set the color, and alpha source blend operation.
Declaration
public GorgonBlendStateBuilder SourceBlend(Blend? color = null, Blend? alpha = null)
Parameters
Type | Name | Description |
---|---|---|
Blend? | color | [Optional] The color blend operation to assign. |
Blend? | alpha | [Optional] The alpha blend operation to assign. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |
See Also
| Edit this page View SourceWriteMask(WriteMask)
Function to set the write mask.
Declaration
public GorgonBlendStateBuilder WriteMask(WriteMask writeMask)
Parameters
Type | Name | Description |
---|---|---|
WriteMask | writeMask | The write mask to apply. |
Returns
Type | Description |
---|---|
GorgonBlendStateBuilder | The fluent builder interface. |