Class VulkanRenderingInfo

java.lang.Object
com.io7m.jcoronado.api.VulkanRenderingInfo
All Implemented Interfaces:
VulkanRenderingInfoType

public final class VulkanRenderingInfo extends Object implements VulkanRenderingInfoType
Structure specifying render pass instance begin info.
See Also:
  • "VkRenderingInfo"
  • Method Details

    • flags

      public Set<VulkanRenderingFlag> flags()
      Specified by:
      flags in interface VulkanRenderingInfoType
      Returns:
      The rendering flags
    • renderArea

      public VulkanRectangle2D renderArea()
      Specified by:
      renderArea in interface VulkanRenderingInfoType
      Returns:
      The rendering area
    • layerCount

      public long layerCount()
      Specified by:
      layerCount in interface VulkanRenderingInfoType
      Returns:
      The layer count
    • viewMask

      public long viewMask()
      Specified by:
      viewMask in interface VulkanRenderingInfoType
      Returns:
      The view mask
    • colorAttachments

      public List<VulkanRenderingAttachmentInfo> colorAttachments()
      Specified by:
      colorAttachments in interface VulkanRenderingInfoType
      Returns:
      The list of color attachments
    • depthAttachment

      public Optional<VulkanRenderingAttachmentInfo> depthAttachment()
      Specified by:
      depthAttachment in interface VulkanRenderingInfoType
      Returns:
      The depth attachment
    • stencilAttachment

      public Optional<VulkanRenderingAttachmentInfo> stencilAttachment()
      Specified by:
      stencilAttachment in interface VulkanRenderingInfoType
      Returns:
      The stencil attachment
    • withFlags

      public final VulkanRenderingInfo withFlags(VulkanRenderingFlag... 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

      public final VulkanRenderingInfo withFlags(Iterable<VulkanRenderingFlag> elements)
      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 or this if not changed
    • withRenderArea

      public final VulkanRenderingInfo withRenderArea(VulkanRectangle2D value)
      Copy the current immutable object by setting a value for the renderArea attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for renderArea
      Returns:
      A modified copy or the this object
    • withLayerCount

      public final VulkanRenderingInfo withLayerCount(long value)
      Copy the current immutable object by setting a value for the layerCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for layerCount
      Returns:
      A modified copy or the this object
    • withViewMask

      public final VulkanRenderingInfo withViewMask(long value)
      Copy the current immutable object by setting a value for the viewMask attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for viewMask
      Returns:
      A modified copy or the this object
    • withColorAttachments

      public final VulkanRenderingInfo withColorAttachments(VulkanRenderingAttachmentInfo... elements)
      Copy the current immutable object with elements that replace the content of colorAttachments.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withColorAttachments

      public final VulkanRenderingInfo withColorAttachments(Iterable<? extends VulkanRenderingAttachmentInfo> elements)
      Copy the current immutable object with elements that replace the content of colorAttachments. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of colorAttachments elements to set
      Returns:
      A modified copy or this if not changed
    • withDepthAttachment

      public final VulkanRenderingInfo withDepthAttachment(VulkanRenderingAttachmentInfo value)
      Copy the current immutable object by setting a present value for the optional depthAttachment attribute.
      Parameters:
      value - The value for depthAttachment
      Returns:
      A modified copy or this if not changed
    • withDepthAttachment

      public final VulkanRenderingInfo withDepthAttachment(Optional<? extends VulkanRenderingAttachmentInfo> optional)
      Copy the current immutable object by setting an optional value for the depthAttachment attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for depthAttachment
      Returns:
      A modified copy or this if not changed
    • withStencilAttachment

      public final VulkanRenderingInfo withStencilAttachment(VulkanRenderingAttachmentInfo value)
      Copy the current immutable object by setting a present value for the optional stencilAttachment attribute.
      Parameters:
      value - The value for stencilAttachment
      Returns:
      A modified copy or this if not changed
    • withStencilAttachment

      public final VulkanRenderingInfo withStencilAttachment(Optional<? extends VulkanRenderingAttachmentInfo> optional)
      Copy the current immutable object by setting an optional value for the stencilAttachment attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for stencilAttachment
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VulkanRenderingInfo 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, renderArea, layerCount, viewMask, colorAttachments, depthAttachment, stencilAttachment.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VulkanRenderingInfo copyOf(VulkanRenderingInfoType instance)
      Creates an immutable copy of a VulkanRenderingInfoType 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 VulkanRenderingInfo instance
    • builder

      public static VulkanRenderingInfo.Builder builder()
      Creates a builder for VulkanRenderingInfo.
      VulkanRenderingInfo.builder()
         .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanRenderingFlag) // flags elements
         .setRenderArea(com.io7m.jcoronado.api.VulkanRectangle2D) // required renderArea
         .setLayerCount(long) // required layerCount
         .setViewMask(long) // optional viewMask
         .addColorAttachments|addAllColorAttachments(VulkanRenderingAttachmentInfo) // colorAttachments elements
         .setDepthAttachment(Optional<VulkanRenderingAttachmentInfo>) // optional depthAttachment
         .setStencilAttachment(Optional<VulkanRenderingAttachmentInfo>) // optional stencilAttachment
         .build();
      
      Returns:
      A new VulkanRenderingInfo builder