Class VulkanRenderingAttachmentInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanRenderingAttachmentInfo.Builder
- Enclosing class:
VulkanRenderingAttachmentInfo
Builds instances of type
VulkanRenderingAttachmentInfo.
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 TypeMethodDescriptionaddAllResolveMode(Iterable<VulkanResolveModeFlag> elements) Adds elements toresolveModeset.addResolveMode(VulkanResolveModeFlag element) Adds one element toresolveModeset.addResolveMode(VulkanResolveModeFlag... elements) Adds elements toresolveModeset.build()Builds a newVulkanRenderingAttachmentInfo.from(VulkanRenderingAttachmentInfoType instance) Fill a builder with attribute values from the providedVulkanRenderingAttachmentInfoTypeinstance.setClearValue(VulkanClearValueType clearValue) Initializes the value for theclearValueattribute.setImageLayout(VulkanImageLayout imageLayout) Initializes the value for theimageLayoutattribute.setImageView(VulkanImageViewType imageView) Initializes the value for theimageViewattribute.setLoadOp(VulkanAttachmentLoadOp loadOp) Initializes the value for theloadOpattribute.setResolveImageLayout(VulkanImageLayout resolveImageLayout) Initializes the value for theresolveImageLayoutattribute.setResolveImageView(VulkanImageViewType resolveImageView) Initializes the optional valueresolveImageViewto resolveImageView.setResolveImageView(Optional<? extends VulkanImageViewType> resolveImageView) Initializes the optional valueresolveImageViewto resolveImageView.setResolveMode(Iterable<VulkanResolveModeFlag> elements) Sets or replaces all elements forresolveModeset.setStoreOp(VulkanAttachmentStoreOp storeOp) Initializes the value for thestoreOpattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanRenderingAttachmentInfoTypeinstance. 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
-
setImageView
Initializes the value for theimageViewattribute.- Parameters:
imageView- The value for imageView- Returns:
thisbuilder for use in a chained invocation
-
setImageLayout
Initializes the value for theimageLayoutattribute.- Parameters:
imageLayout- The value for imageLayout- Returns:
thisbuilder for use in a chained invocation
-
addResolveMode
Adds one element toresolveModeset.- Parameters:
element- A resolveMode element- Returns:
thisbuilder for use in a chained invocation
-
addResolveMode
public final VulkanRenderingAttachmentInfo.Builder addResolveMode(VulkanResolveModeFlag... elements) Adds elements toresolveModeset.- Parameters:
elements- An array of resolveMode elements- Returns:
thisbuilder for use in a chained invocation
-
setResolveMode
public final VulkanRenderingAttachmentInfo.Builder setResolveMode(Iterable<VulkanResolveModeFlag> elements) Sets or replaces all elements forresolveModeset.- Parameters:
elements- An iterable of resolveMode elements- Returns:
thisbuilder for use in a chained invocation
-
addAllResolveMode
public final VulkanRenderingAttachmentInfo.Builder addAllResolveMode(Iterable<VulkanResolveModeFlag> elements) Adds elements toresolveModeset.- Parameters:
elements- An iterable of resolveMode elements- Returns:
thisbuilder for use in a chained invocation
-
setResolveImageView
public final VulkanRenderingAttachmentInfo.Builder setResolveImageView(VulkanImageViewType resolveImageView) Initializes the optional valueresolveImageViewto resolveImageView.- Parameters:
resolveImageView- The value for resolveImageView- Returns:
thisbuilder for chained invocation
-
setResolveImageView
public final VulkanRenderingAttachmentInfo.Builder setResolveImageView(Optional<? extends VulkanImageViewType> resolveImageView) Initializes the optional valueresolveImageViewto resolveImageView.- Parameters:
resolveImageView- The value for resolveImageView- Returns:
thisbuilder for use in a chained invocation
-
setResolveImageLayout
public final VulkanRenderingAttachmentInfo.Builder setResolveImageLayout(VulkanImageLayout resolveImageLayout) Initializes the value for theresolveImageLayoutattribute.If not set, this attribute will have a default value as returned by the initializer of
resolveImageLayout.- Parameters:
resolveImageLayout- The value for resolveImageLayout- Returns:
thisbuilder for use in a chained invocation
-
setLoadOp
Initializes the value for theloadOpattribute.- Parameters:
loadOp- The value for loadOp- Returns:
thisbuilder for use in a chained invocation
-
setStoreOp
Initializes the value for thestoreOpattribute.- Parameters:
storeOp- The value for storeOp- Returns:
thisbuilder for use in a chained invocation
-
setClearValue
Initializes the value for theclearValueattribute.- Parameters:
clearValue- The value for clearValue- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanRenderingAttachmentInfo.- Returns:
- An immutable instance of VulkanRenderingAttachmentInfo
- Throws:
IllegalStateException- if any required attributes are missing
-