Class VulkanRenderingInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanRenderingInfo.Builder
- Enclosing class:
VulkanRenderingInfo
Builds instances of type
VulkanRenderingInfo.
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 TypeMethodDescriptionaddAllColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements) Adds elements tocolorAttachmentslist.addAllFlags(Iterable<VulkanRenderingFlag> elements) Adds elements toflagsset.Adds one element tocolorAttachmentslist.addColorAttachments(VulkanRenderingAttachmentInfo... elements) Adds elements tocolorAttachmentslist.addFlags(VulkanRenderingFlag element) Adds one element toflagsset.addFlags(VulkanRenderingFlag... elements) Adds elements toflagsset.build()Builds a newVulkanRenderingInfo.from(VulkanRenderingInfoType instance) Fill a builder with attribute values from the providedVulkanRenderingInfoTypeinstance.setColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements) Sets or replaces all elements forcolorAttachmentslist.setDepthAttachment(VulkanRenderingAttachmentInfo depthAttachment) Initializes the optional valuedepthAttachmentto depthAttachment.setDepthAttachment(Optional<? extends VulkanRenderingAttachmentInfo> depthAttachment) Initializes the optional valuedepthAttachmentto depthAttachment.setFlags(Iterable<VulkanRenderingFlag> elements) Sets or replaces all elements forflagsset.setLayerCount(long layerCount) Initializes the value for thelayerCountattribute.setRenderArea(VulkanRectangle2D renderArea) Initializes the value for therenderAreaattribute.setStencilAttachment(VulkanRenderingAttachmentInfo stencilAttachment) Initializes the optional valuestencilAttachmentto stencilAttachment.setStencilAttachment(Optional<? extends VulkanRenderingAttachmentInfo> stencilAttachment) Initializes the optional valuestencilAttachmentto stencilAttachment.setViewMask(long viewMask) Initializes the value for theviewMaskattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanRenderingInfoTypeinstance. 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
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setRenderArea
Initializes the value for therenderAreaattribute.- Parameters:
renderArea- The value for renderArea- Returns:
thisbuilder for use in a chained invocation
-
setLayerCount
Initializes the value for thelayerCountattribute.- Parameters:
layerCount- The value for layerCount- Returns:
thisbuilder for use in a chained invocation
-
setViewMask
-
addColorAttachments
Adds one element tocolorAttachmentslist.- Parameters:
element- A colorAttachments element- Returns:
thisbuilder for use in a chained invocation
-
addColorAttachments
public final VulkanRenderingInfo.Builder addColorAttachments(VulkanRenderingAttachmentInfo... elements) Adds elements tocolorAttachmentslist.- Parameters:
elements- An array of colorAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
setColorAttachments
public final VulkanRenderingInfo.Builder setColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements) Sets or replaces all elements forcolorAttachmentslist.- Parameters:
elements- An iterable of colorAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllColorAttachments
public final VulkanRenderingInfo.Builder addAllColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements) Adds elements tocolorAttachmentslist.- Parameters:
elements- An iterable of colorAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
setDepthAttachment
public final VulkanRenderingInfo.Builder setDepthAttachment(VulkanRenderingAttachmentInfo depthAttachment) Initializes the optional valuedepthAttachmentto depthAttachment.- Parameters:
depthAttachment- The value for depthAttachment- Returns:
thisbuilder for chained invocation
-
setDepthAttachment
public final VulkanRenderingInfo.Builder setDepthAttachment(Optional<? extends VulkanRenderingAttachmentInfo> depthAttachment) Initializes the optional valuedepthAttachmentto depthAttachment.- Parameters:
depthAttachment- The value for depthAttachment- Returns:
thisbuilder for use in a chained invocation
-
setStencilAttachment
public final VulkanRenderingInfo.Builder setStencilAttachment(VulkanRenderingAttachmentInfo stencilAttachment) Initializes the optional valuestencilAttachmentto stencilAttachment.- Parameters:
stencilAttachment- The value for stencilAttachment- Returns:
thisbuilder for chained invocation
-
setStencilAttachment
public final VulkanRenderingInfo.Builder setStencilAttachment(Optional<? extends VulkanRenderingAttachmentInfo> stencilAttachment) Initializes the optional valuestencilAttachmentto stencilAttachment.- Parameters:
stencilAttachment- The value for stencilAttachment- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanRenderingInfo.- Returns:
- An immutable instance of VulkanRenderingInfo
- Throws:
IllegalStateException- if any required attributes are missing
-