Class VulkanPipelineColorBlendAttachmentState.Builder
- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanPipelineColorBlendAttachmentState.Builder
-
- Enclosing class:
- VulkanPipelineColorBlendAttachmentState
public static final class VulkanPipelineColorBlendAttachmentState.Builder extends java.lang.Object
Builds instances of typeVulkanPipelineColorBlendAttachmentState
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.Builder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
public final VulkanPipelineColorBlendAttachmentState.Builder from(VulkanPipelineColorBlendAttachmentStateType instance)
Fill a builder with attribute values from the providedVulkanPipelineColorBlendAttachmentStateType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setEnable
public final VulkanPipelineColorBlendAttachmentState.Builder setEnable(boolean enable)
Initializes the value for theenable
attribute.- Parameters:
enable
- The value for enable- Returns:
this
builder for use in a chained invocation
-
setSrcColorBlendFactor
public final VulkanPipelineColorBlendAttachmentState.Builder setSrcColorBlendFactor(VulkanBlendFactor srcColorBlendFactor)
Initializes the value for thesrcColorBlendFactor
attribute.If not set, this attribute will have a default value as returned by the initializer of
srcColorBlendFactor
.- Parameters:
srcColorBlendFactor
- The value for srcColorBlendFactor- Returns:
this
builder for use in a chained invocation
-
setDstColorBlendFactor
public final VulkanPipelineColorBlendAttachmentState.Builder setDstColorBlendFactor(VulkanBlendFactor dstColorBlendFactor)
Initializes the value for thedstColorBlendFactor
attribute.If not set, this attribute will have a default value as returned by the initializer of
dstColorBlendFactor
.- Parameters:
dstColorBlendFactor
- The value for dstColorBlendFactor- Returns:
this
builder for use in a chained invocation
-
setColorBlendOp
public final VulkanPipelineColorBlendAttachmentState.Builder setColorBlendOp(VulkanBlendOp colorBlendOp)
Initializes the value for thecolorBlendOp
attribute.If not set, this attribute will have a default value as returned by the initializer of
colorBlendOp
.- Parameters:
colorBlendOp
- The value for colorBlendOp- Returns:
this
builder for use in a chained invocation
-
setSrcAlphaBlendFactor
public final VulkanPipelineColorBlendAttachmentState.Builder setSrcAlphaBlendFactor(VulkanBlendFactor srcAlphaBlendFactor)
Initializes the value for thesrcAlphaBlendFactor
attribute.If not set, this attribute will have a default value as returned by the initializer of
srcAlphaBlendFactor
.- Parameters:
srcAlphaBlendFactor
- The value for srcAlphaBlendFactor- Returns:
this
builder for use in a chained invocation
-
setDstAlphaBlendFactor
public final VulkanPipelineColorBlendAttachmentState.Builder setDstAlphaBlendFactor(VulkanBlendFactor dstAlphaBlendFactor)
Initializes the value for thedstAlphaBlendFactor
attribute.If not set, this attribute will have a default value as returned by the initializer of
dstAlphaBlendFactor
.- Parameters:
dstAlphaBlendFactor
- The value for dstAlphaBlendFactor- Returns:
this
builder for use in a chained invocation
-
setAlphaBlendOp
public final VulkanPipelineColorBlendAttachmentState.Builder setAlphaBlendOp(VulkanBlendOp alphaBlendOp)
Initializes the value for thealphaBlendOp
attribute.If not set, this attribute will have a default value as returned by the initializer of
alphaBlendOp
.- Parameters:
alphaBlendOp
- The value for alphaBlendOp- Returns:
this
builder for use in a chained invocation
-
addColorWriteMask
public final VulkanPipelineColorBlendAttachmentState.Builder addColorWriteMask(VulkanColorComponentFlag element)
Adds one element tocolorWriteMask
set.- Parameters:
element
- A colorWriteMask element- Returns:
this
builder for use in a chained invocation
-
addColorWriteMask
public final VulkanPipelineColorBlendAttachmentState.Builder addColorWriteMask(VulkanColorComponentFlag... elements)
Adds elements tocolorWriteMask
set.- Parameters:
elements
- An array of colorWriteMask elements- Returns:
this
builder for use in a chained invocation
-
setColorWriteMask
public final VulkanPipelineColorBlendAttachmentState.Builder setColorWriteMask(java.lang.Iterable<VulkanColorComponentFlag> elements)
Sets or replaces all elements forcolorWriteMask
set.- Parameters:
elements
- An iterable of colorWriteMask elements- Returns:
this
builder for use in a chained invocation
-
addAllColorWriteMask
public final VulkanPipelineColorBlendAttachmentState.Builder addAllColorWriteMask(java.lang.Iterable<VulkanColorComponentFlag> elements)
Adds elements tocolorWriteMask
set.- Parameters:
elements
- An iterable of colorWriteMask elements- Returns:
this
builder for use in a chained invocation
-
build
public VulkanPipelineColorBlendAttachmentState build()
Builds a newVulkanPipelineColorBlendAttachmentState
.- Returns:
- An immutable instance of VulkanPipelineColorBlendAttachmentState
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-