Class VulkanPipelineColorBlendAttachmentState
java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineColorBlendAttachmentState
- All Implemented Interfaces:
VulkanPipelineColorBlendAttachmentStateType
public final class VulkanPipelineColorBlendAttachmentState
extends Object
implements VulkanPipelineColorBlendAttachmentStateType
Structure specifying a pipeline color blend attachment state.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanPipelineColorBlendAttachmentState. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanPipelineColorBlendAttachmentState.Creates an immutable copy of aVulkanPipelineColorBlendAttachmentStateTypevalue.booleanenable()booleanThis instance is equal to all instances ofVulkanPipelineColorBlendAttachmentStatethat have equal attribute values.inthashCode()Computes a hash code from attributes:enable,srcColorBlendFactor,dstColorBlendFactor,colorBlendOp,srcAlphaBlendFactor,dstAlphaBlendFactor,alphaBlendOp,colorWriteMask.toString()Prints the immutable valueVulkanPipelineColorBlendAttachmentStatewith attribute values.withAlphaBlendOp(VulkanBlendOp value) Copy the current immutable object by setting a value for thealphaBlendOpattribute.withColorBlendOp(VulkanBlendOp value) Copy the current immutable object by setting a value for thecolorBlendOpattribute.withColorWriteMask(VulkanColorComponentFlag... elements) Copy the current immutable object with elements that replace the content ofcolorWriteMask.withColorWriteMask(Iterable<VulkanColorComponentFlag> elements) Copy the current immutable object with elements that replace the content ofcolorWriteMask.Copy the current immutable object by setting a value for thedstAlphaBlendFactorattribute.Copy the current immutable object by setting a value for thedstColorBlendFactorattribute.withEnable(boolean value) Copy the current immutable object by setting a value for theenableattribute.Copy the current immutable object by setting a value for thesrcAlphaBlendFactorattribute.Copy the current immutable object by setting a value for thesrcColorBlendFactorattribute.
-
Method Details
-
enable
public boolean enable()- Specified by:
enablein interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
trueif blending is enabled for the corresponding color attachment. If blending is not enabled, the source fragment’s color for that attachment is passed through unmodified.
-
srcColorBlendFactor
- Specified by:
srcColorBlendFactorin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend factor used to determine the source factors (Sr,Sg,Sb).
-
dstColorBlendFactor
- Specified by:
dstColorBlendFactorin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend factor used to determine the destination factors (Dr,Dg,Db).
-
colorBlendOp
- Specified by:
colorBlendOpin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend operation used to calculate the RGB values to write to the color attachment.
-
srcAlphaBlendFactor
- Specified by:
srcAlphaBlendFactorin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend factor used to determine the source factor Sa.
-
dstAlphaBlendFactor
- Specified by:
dstAlphaBlendFactorin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend factor used to determine the destination factor Da.
-
alphaBlendOp
- Specified by:
alphaBlendOpin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the blend operation used to calculate the alpha values to write to the color attachment.
-
colorWriteMask
- Specified by:
colorWriteMaskin interfaceVulkanPipelineColorBlendAttachmentStateType- Returns:
- the R, G, B, and/or A components enabled for writing.
-
withEnable
Copy the current immutable object by setting a value for theenableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for enable- Returns:
- A modified copy or the
thisobject
-
withSrcColorBlendFactor
public final VulkanPipelineColorBlendAttachmentState withSrcColorBlendFactor(VulkanBlendFactor value) Copy the current immutable object by setting a value for thesrcColorBlendFactorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for srcColorBlendFactor- Returns:
- A modified copy or the
thisobject
-
withDstColorBlendFactor
public final VulkanPipelineColorBlendAttachmentState withDstColorBlendFactor(VulkanBlendFactor value) Copy the current immutable object by setting a value for thedstColorBlendFactorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dstColorBlendFactor- Returns:
- A modified copy or the
thisobject
-
withColorBlendOp
Copy the current immutable object by setting a value for thecolorBlendOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for colorBlendOp- Returns:
- A modified copy or the
thisobject
-
withSrcAlphaBlendFactor
public final VulkanPipelineColorBlendAttachmentState withSrcAlphaBlendFactor(VulkanBlendFactor value) Copy the current immutable object by setting a value for thesrcAlphaBlendFactorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for srcAlphaBlendFactor- Returns:
- A modified copy or the
thisobject
-
withDstAlphaBlendFactor
public final VulkanPipelineColorBlendAttachmentState withDstAlphaBlendFactor(VulkanBlendFactor value) Copy the current immutable object by setting a value for thedstAlphaBlendFactorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dstAlphaBlendFactor- Returns:
- A modified copy or the
thisobject
-
withAlphaBlendOp
Copy the current immutable object by setting a value for thealphaBlendOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for alphaBlendOp- Returns:
- A modified copy or the
thisobject
-
withColorWriteMask
public final VulkanPipelineColorBlendAttachmentState withColorWriteMask(VulkanColorComponentFlag... elements) Copy the current immutable object with elements that replace the content ofcolorWriteMask.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withColorWriteMask
public final VulkanPipelineColorBlendAttachmentState withColorWriteMask(Iterable<VulkanColorComponentFlag> elements) Copy the current immutable object with elements that replace the content ofcolorWriteMask. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of colorWriteMask elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
public static VulkanPipelineColorBlendAttachmentState copyOf(VulkanPipelineColorBlendAttachmentStateType instance) Creates an immutable copy of aVulkanPipelineColorBlendAttachmentStateTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VulkanPipelineColorBlendAttachmentState instance
-
builder
Creates a builder forVulkanPipelineColorBlendAttachmentState.VulkanPipelineColorBlendAttachmentState.builder() .setEnable(boolean) // optional
enable.setSrcColorBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optionalsrcColorBlendFactor.setDstColorBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optionaldstColorBlendFactor.setColorBlendOp(com.io7m.jcoronado.api.VulkanBlendOp) // optionalcolorBlendOp.setSrcAlphaBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optionalsrcAlphaBlendFactor.setDstAlphaBlendFactor(com.io7m.jcoronado.api.VulkanBlendFactor) // optionaldstAlphaBlendFactor.setAlphaBlendOp(com.io7m.jcoronado.api.VulkanBlendOp) // optionalalphaBlendOp.addColorWriteMask|addAllColorWriteMask(com.io7m.jcoronado.api.VulkanColorComponentFlag) //colorWriteMaskelements .build();- Returns:
- A new VulkanPipelineColorBlendAttachmentState builder
-