Class VulkanClearAttachment

    • Method Detail

      • colorAttachment

        public int colorAttachment()
        Specified by:
        colorAttachment in interface VulkanClearAttachmentType
        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.
      • withAspectMask

        public final VulkanClearAttachment withAspectMask​(VulkanImageAspectFlag... elements)
        Copy the current immutable object with elements that replace the content of aspectMask.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withAspectMask

        public final VulkanClearAttachment withAspectMask​(java.lang.Iterable<VulkanImageAspectFlag> elements)
        Copy the current immutable object with elements that replace the content of aspectMask. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of aspectMask elements to set
        Returns:
        A modified copy of this object
      • withColorAttachment

        public final VulkanClearAttachment withColorAttachment​(int value)
        Copy the current immutable object by setting a value for the colorAttachment attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for colorAttachment
        Returns:
        A modified copy of the this object
      • withClearValue

        public final VulkanClearAttachment withClearValue​(VulkanClearValueType value)
        Copy the current immutable object by setting a value for the clearValue attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for clearValue
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of VulkanClearAttachment that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: aspectMask, colorAttachment, clearValue.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value VulkanClearAttachment with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static VulkanClearAttachment of​(java.util.Set<VulkanImageAspectFlag> aspectMask,
                                               int colorAttachment,
                                               VulkanClearValueType clearValue)
        Construct a new immutable VulkanClearAttachment instance.
        Parameters:
        aspectMask - The value for the aspectMask attribute
        colorAttachment - The value for the colorAttachment attribute
        clearValue - The value for the clearValue attribute
        Returns:
        An immutable VulkanClearAttachment instance
      • of

        public static VulkanClearAttachment of​(java.lang.Iterable<VulkanImageAspectFlag> aspectMask,
                                               int colorAttachment,
                                               VulkanClearValueType clearValue)
        Construct a new immutable VulkanClearAttachment instance.
        Parameters:
        aspectMask - The value for the aspectMask attribute
        colorAttachment - The value for the colorAttachment attribute
        clearValue - The value for the clearValue attribute
        Returns:
        An immutable VulkanClearAttachment instance
      • copyOf

        public static VulkanClearAttachment copyOf​(VulkanClearAttachmentType instance)
        Creates an immutable copy of a VulkanClearAttachmentType 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