Class VulkanAttachmentDescription

java.lang.Object
com.io7m.jcoronado.api.VulkanAttachmentDescription
All Implemented Interfaces:
VulkanAttachmentDescriptionType

public final class VulkanAttachmentDescription extends Object implements VulkanAttachmentDescriptionType
Structure specifying an attachment description
See Also:
  • "VkAttachmentDescription"
  • Method Details

    • flags

      Specified by:
      flags in interface VulkanAttachmentDescriptionType
      Returns:
      flags specifying additional properties of the attachment.
    • format

      public VulkanFormat format()
      Specified by:
      format in interface VulkanAttachmentDescriptionType
      Returns:
      the format of the image view that will be used for the attachment.
    • samples

      public VulkanSampleCountFlag samples()
      Specified by:
      samples in interface VulkanAttachmentDescriptionType
      Returns:
      the number of samples of the image.
    • loadOp

      public VulkanAttachmentLoadOp loadOp()
      Specified by:
      loadOp in interface VulkanAttachmentDescriptionType
      Returns:
      A value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.
    • storeOp

      public VulkanAttachmentStoreOp storeOp()
      Specified by:
      storeOp in interface VulkanAttachmentDescriptionType
      Returns:
      A value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.
    • stencilLoadOp

      public VulkanAttachmentLoadOp stencilLoadOp()
      Specified by:
      stencilLoadOp in interface VulkanAttachmentDescriptionType
      Returns:
      A value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.
    • stencilStoreOp

      public VulkanAttachmentStoreOp stencilStoreOp()
      Specified by:
      stencilStoreOp in interface VulkanAttachmentDescriptionType
      Returns:
      A value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.
    • initialLayout

      public VulkanImageLayout initialLayout()
      Specified by:
      initialLayout in interface VulkanAttachmentDescriptionType
      Returns:
      The layout the attachment image subresource will be in when a render pass instance begins.
    • finalLayout

      public VulkanImageLayout finalLayout()
      Specified by:
      finalLayout in interface VulkanAttachmentDescriptionType
      Returns:
      The layout the attachment image subresource will be transitioned to when a render pass instance ends. During a render pass instance, an attachment can use a different layout in each subpass, if desired.
    • withFlags

      public final VulkanAttachmentDescription withFlags(VulkanAttachmentDescriptionFlag... elements)
      Copy the current immutable object with elements that replace the content of flags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFlags

      Copy the current immutable object with elements that replace the content of flags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of flags elements to set
      Returns:
      A modified copy of this object
    • withFormat

      public final VulkanAttachmentDescription withFormat(VulkanFormat value)
      Copy the current immutable object by setting a value for the format attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for format
      Returns:
      A modified copy of the this object
    • withSamples

      public final VulkanAttachmentDescription withSamples(VulkanSampleCountFlag value)
      Copy the current immutable object by setting a value for the samples attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for samples
      Returns:
      A modified copy of the this object
    • withLoadOp

      public final VulkanAttachmentDescription withLoadOp(VulkanAttachmentLoadOp value)
      Copy the current immutable object by setting a value for the loadOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for loadOp
      Returns:
      A modified copy of the this object
    • withStoreOp

      public final VulkanAttachmentDescription withStoreOp(VulkanAttachmentStoreOp value)
      Copy the current immutable object by setting a value for the storeOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for storeOp
      Returns:
      A modified copy of the this object
    • withStencilLoadOp

      public final VulkanAttachmentDescription withStencilLoadOp(VulkanAttachmentLoadOp value)
      Copy the current immutable object by setting a value for the stencilLoadOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stencilLoadOp
      Returns:
      A modified copy of the this object
    • withStencilStoreOp

      public final VulkanAttachmentDescription withStencilStoreOp(VulkanAttachmentStoreOp value)
      Copy the current immutable object by setting a value for the stencilStoreOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stencilStoreOp
      Returns:
      A modified copy of the this object
    • withInitialLayout

      public final VulkanAttachmentDescription withInitialLayout(VulkanImageLayout value)
      Copy the current immutable object by setting a value for the initialLayout attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for initialLayout
      Returns:
      A modified copy of the this object
    • withFinalLayout

      public final VulkanAttachmentDescription withFinalLayout(VulkanImageLayout value)
      Copy the current immutable object by setting a value for the finalLayout attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for finalLayout
      Returns:
      A modified copy of the this object
    • equals

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

      public int hashCode()
      Computes a hash code from attributes: flags, format, samples, loadOp, storeOp, stencilLoadOp, stencilStoreOp, initialLayout, finalLayout.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Construct a new immutable VulkanAttachmentDescription instance.
      Parameters:
      flags - The value for the flags attribute
      format - The value for the format attribute
      samples - The value for the samples attribute
      loadOp - The value for the loadOp attribute
      storeOp - The value for the storeOp attribute
      stencilLoadOp - The value for the stencilLoadOp attribute
      stencilStoreOp - The value for the stencilStoreOp attribute
      initialLayout - The value for the initialLayout attribute
      finalLayout - The value for the finalLayout attribute
      Returns:
      An immutable VulkanAttachmentDescription instance
    • of

      Construct a new immutable VulkanAttachmentDescription instance.
      Parameters:
      flags - The value for the flags attribute
      format - The value for the format attribute
      samples - The value for the samples attribute
      loadOp - The value for the loadOp attribute
      storeOp - The value for the storeOp attribute
      stencilLoadOp - The value for the stencilLoadOp attribute
      stencilStoreOp - The value for the stencilStoreOp attribute
      initialLayout - The value for the initialLayout attribute
      finalLayout - The value for the finalLayout attribute
      Returns:
      An immutable VulkanAttachmentDescription instance
    • copyOf

      Creates an immutable copy of a VulkanAttachmentDescriptionType 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 VulkanAttachmentDescription instance
    • builder

      public static VulkanAttachmentDescription.Builder builder()
      Creates a builder for VulkanAttachmentDescription.
       VulkanAttachmentDescription.builder()
          .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanAttachmentDescriptionFlag) // flags elements
          .setFormat(com.io7m.jcoronado.api.VulkanFormat) // required format
          .setSamples(com.io7m.jcoronado.api.VulkanSampleCountFlag) // required samples
          .setLoadOp(com.io7m.jcoronado.api.VulkanAttachmentLoadOp) // required loadOp
          .setStoreOp(com.io7m.jcoronado.api.VulkanAttachmentStoreOp) // required storeOp
          .setStencilLoadOp(com.io7m.jcoronado.api.VulkanAttachmentLoadOp) // required stencilLoadOp
          .setStencilStoreOp(com.io7m.jcoronado.api.VulkanAttachmentStoreOp) // required stencilStoreOp
          .setInitialLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required initialLayout
          .setFinalLayout(com.io7m.jcoronado.api.VulkanImageLayout) // required finalLayout
          .build();
       
      Returns:
      A new VulkanAttachmentDescription builder