Class VulkanClearAttachment
java.lang.Object
com.io7m.jcoronado.api.VulkanClearAttachment
- All Implemented Interfaces:
VulkanClearAttachmentType
Structure specifying a clear attachment.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeVulkanClearAttachment
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forVulkanClearAttachment
.int
static VulkanClearAttachment
copyOf
(VulkanClearAttachmentType instance) Creates an immutable copy of aVulkanClearAttachmentType
value.boolean
This instance is equal to all instances ofVulkanClearAttachment
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:aspectMask
,colorAttachment
,clearValue
.static VulkanClearAttachment
of
(Iterable<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachment
instance.static VulkanClearAttachment
of
(Set<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachment
instance.toString()
Prints the immutable valueVulkanClearAttachment
with attribute values.final VulkanClearAttachment
withAspectMask
(VulkanImageAspectFlag... elements) Copy the current immutable object with elements that replace the content ofaspectMask
.final VulkanClearAttachment
withAspectMask
(Iterable<VulkanImageAspectFlag> elements) Copy the current immutable object with elements that replace the content ofaspectMask
.final VulkanClearAttachment
Copy the current immutable object by setting a value for theclearValue
attribute.final VulkanClearAttachment
withColorAttachment
(int value) Copy the current immutable object by setting a value for thecolorAttachment
attribute.
-
Method Details
-
aspectMask
- Specified by:
aspectMask
in interfaceVulkanClearAttachmentType
- Returns:
- A mask selecting the color, depth and/or stencil aspects of the attachment to be cleared.
-
colorAttachment
public int colorAttachment()- Specified by:
colorAttachment
in 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:
clearValue
in 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
this
object
-
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
this
object
-
withColorAttachment
Copy the current immutable object by setting a value for thecolorAttachment
attribute. 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
this
object
-
withClearValue
Copy the current immutable object by setting a value for theclearValue
attribute. 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
this
object
-
equals
-
hashCode
-
toString
-
of
public static VulkanClearAttachment of(Set<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachment
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributecolorAttachment
- The value for thecolorAttachment
attributeclearValue
- The value for theclearValue
attribute- Returns:
- An immutable VulkanClearAttachment instance
-
of
public static VulkanClearAttachment of(Iterable<VulkanImageAspectFlag> aspectMask, int colorAttachment, VulkanClearValueType clearValue) Construct a new immutableVulkanClearAttachment
instance.- Parameters:
aspectMask
- The value for theaspectMask
attributecolorAttachment
- The value for thecolorAttachment
attributeclearValue
- The value for theclearValue
attribute- Returns:
- An immutable VulkanClearAttachment instance
-
copyOf
Creates an immutable copy of aVulkanClearAttachmentType
value. 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) //
aspectMask
elements .setColorAttachment(int) // requiredcolorAttachment
.setClearValue(com.io7m.jcoronado.api.VulkanClearValueType) // requiredclearValue
.build();- Returns:
- A new VulkanClearAttachment builder
-