Class VulkanAttachmentDescription.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanAttachmentDescription.Builder
- Enclosing class:
VulkanAttachmentDescription
Builds instances of type
VulkanAttachmentDescription.
Initialize attributes and then invoke the build() 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
Modifier and TypeMethodDescriptionaddAllFlags(Iterable<VulkanAttachmentDescriptionFlag> elements) Adds elements toflagsset.addFlags(VulkanAttachmentDescriptionFlag element) Adds one element toflagsset.addFlags(VulkanAttachmentDescriptionFlag... elements) Adds elements toflagsset.build()Builds a newVulkanAttachmentDescription.from(VulkanAttachmentDescriptionType instance) Fill a builder with attribute values from the providedVulkanAttachmentDescriptionTypeinstance.setFinalLayout(VulkanImageLayout finalLayout) Initializes the value for thefinalLayoutattribute.setFlags(Iterable<VulkanAttachmentDescriptionFlag> elements) Sets or replaces all elements forflagsset.setFormat(VulkanFormat format) Initializes the value for theformatattribute.setInitialLayout(VulkanImageLayout initialLayout) Initializes the value for theinitialLayoutattribute.setLoadOp(VulkanAttachmentLoadOp loadOp) Initializes the value for theloadOpattribute.setSamples(VulkanSampleCountFlag samples) Initializes the value for thesamplesattribute.setStencilLoadOp(VulkanAttachmentLoadOp stencilLoadOp) Initializes the value for thestencilLoadOpattribute.setStencilStoreOp(VulkanAttachmentStoreOp stencilStoreOp) Initializes the value for thestencilStoreOpattribute.setStoreOp(VulkanAttachmentStoreOp storeOp) Initializes the value for thestoreOpattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanAttachmentDescriptionTypeinstance. 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:
thisbuilder for use in a chained invocation
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
public final VulkanAttachmentDescription.Builder addFlags(VulkanAttachmentDescriptionFlag... elements) Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
public final VulkanAttachmentDescription.Builder setFlags(Iterable<VulkanAttachmentDescriptionFlag> elements) Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
public final VulkanAttachmentDescription.Builder addAllFlags(Iterable<VulkanAttachmentDescriptionFlag> elements) Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFormat
-
setSamples
-
setLoadOp
-
setStoreOp
-
setStencilLoadOp
public final VulkanAttachmentDescription.Builder setStencilLoadOp(VulkanAttachmentLoadOp stencilLoadOp) Initializes the value for thestencilLoadOpattribute.If not set, this attribute will have a default value as returned by the initializer of
stencilLoadOp.- Parameters:
stencilLoadOp- The value for stencilLoadOp- Returns:
thisbuilder for use in a chained invocation
-
setStencilStoreOp
public final VulkanAttachmentDescription.Builder setStencilStoreOp(VulkanAttachmentStoreOp stencilStoreOp) Initializes the value for thestencilStoreOpattribute.If not set, this attribute will have a default value as returned by the initializer of
stencilStoreOp.- Parameters:
stencilStoreOp- The value for stencilStoreOp- Returns:
thisbuilder for use in a chained invocation
-
setInitialLayout
Initializes the value for theinitialLayoutattribute.If not set, this attribute will have a default value as returned by the initializer of
initialLayout.- Parameters:
initialLayout- The value for initialLayout- Returns:
thisbuilder for use in a chained invocation
-
setFinalLayout
Initializes the value for thefinalLayoutattribute.If not set, this attribute will have a default value as returned by the initializer of
finalLayout.- Parameters:
finalLayout- The value for finalLayout- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanAttachmentDescription.- Returns:
- An immutable instance of VulkanAttachmentDescription
- Throws:
IllegalStateException- if any required attributes are missing
-