Class VulkanClearAttachment
java.lang.Object
com.io7m.jcoronado.api.VulkanClearAttachment
- All Implemented Interfaces:
VulkanClearAttachmentType
Structure specifying a clear attachment.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanClearAttachment. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanClearAttachment.intstatic VulkanClearAttachmentcopyOf(VulkanClearAttachmentType instance) Creates an immutable copy of aVulkanClearAttachmentTypevalue.booleanThis instance is equal to all instances ofVulkanClearAttachmentthat have equal attribute values.inthashCode()Computes a hash code from attributes:aspectMask,colorAttachment,clearValue.static VulkanClearAttachmentof(Iterable<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachmentinstance.static VulkanClearAttachmentof(Set<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachmentinstance.toString()Prints the immutable valueVulkanClearAttachmentwith attribute values.final VulkanClearAttachmentwithAspectMask(VulkanImageAspectFlag... elements) Copy the current immutable object with elements that replace the content ofaspectMask.final VulkanClearAttachmentwithAspectMask(Iterable<VulkanImageAspectFlag> elements) Copy the current immutable object with elements that replace the content ofaspectMask.final VulkanClearAttachmentCopy the current immutable object by setting a value for theclearValueattribute.final VulkanClearAttachmentwithColorAttachment(int value) Copy the current immutable object by setting a value for thecolorAttachmentattribute.
-
Method Details
-
aspectMask
- Specified by:
aspectMaskin interfaceVulkanClearAttachmentType- Returns:
- A mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.
-
colorAttachment
public int colorAttachment()- Specified by:
colorAttachmentin interfaceVulkanClearAttachmentType- Returns:
- A value that is only meaningful if VK_IMAGE_ASPECT_COLOR_BIT is set in aspectMask, in which case it is an index to the pColorAttachments array in the VkSubpassDescription structure of the current subpass which selects the color attachment to clear.
-
clearValue
- Specified by:
clearValuein interfaceVulkanClearAttachmentType- Returns:
- The color or depth/stencil value to clear the attachment to
-
withAspectMask
Copy the current immutable object with elements that replace the content ofaspectMask.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAspectMask
Copy the current immutable object with elements that replace the content ofaspectMask. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of aspectMask elements to set- Returns:
- A modified copy of
thisobject
-
withColorAttachment
Copy the current immutable object by setting a value for thecolorAttachmentattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for colorAttachment- Returns:
- A modified copy of the
thisobject
-
withClearValue
Copy the current immutable object by setting a value for theclearValueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for clearValue- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanClearAttachment of(Set<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachmentinstance.- Parameters:
aspectMask- The value for theaspectMaskattributecolorAttachment- The value for thecolorAttachmentattributeclearValue- The value for theclearValueattribute- Returns:
- An immutable VulkanClearAttachment instance
-
of
public static VulkanClearAttachment of(Iterable<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachmentinstance.- Parameters:
aspectMask- The value for theaspectMaskattributecolorAttachment- The value for thecolorAttachmentattributeclearValue- The value for theclearValueattribute- Returns:
- An immutable VulkanClearAttachment instance
-
copyOf
Creates an immutable copy of aVulkanClearAttachmentTypevalue. 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 VulkanClearAttachment instance
-
builder
Creates a builder forVulkanClearAttachment.VulkanClearAttachment.builder() .addAspectMask|addAllAspectMask(com.io7m.jcoronado.api.VulkanImageAspectFlag) //aspectMaskelements .setColorAttachment(int) // requiredcolorAttachment.setClearValue(com.io7m.jcoronado.api.VulkanClearValueType) // requiredclearValue.build();- Returns:
- A new VulkanClearAttachment builder
-