Class JCSwapchainSubmitInfo

java.lang.Object
com.io7m.jcoronado.utility.swapchain.JCSwapchainSubmitInfo
All Implemented Interfaces:
JCSwapchainSubmitInfoType

public final class JCSwapchainSubmitInfo extends Object implements JCSwapchainSubmitInfoType
The information required to submit and present a frame.
  • Method Details

    • commandBuffers

      public List<VulkanCommandBufferType> commandBuffers()
      Specified by:
      commandBuffers in interface JCSwapchainSubmitInfoType
      Returns:
      The command buffers to execute
    • waitSemaphores

      public List<VulkanSemaphoreSubmitInfo> waitSemaphores()
      Specified by:
      waitSemaphores in interface JCSwapchainSubmitInfoType
      Returns:
      The semaphores to wait on (in addition to the swapchain's acquire semaphore)
    • signalSemaphores

      public List<VulkanSemaphoreSubmitInfo> signalSemaphores()
      Specified by:
      signalSemaphores in interface JCSwapchainSubmitInfoType
      Returns:
      The semaphores to signal (in addition to the swapchain's render-done semaphore)
    • withCommandBuffers

      public final JCSwapchainSubmitInfo withCommandBuffers(VulkanCommandBufferType... elements)
      Copy the current immutable object with elements that replace the content of commandBuffers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCommandBuffers

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

      public final JCSwapchainSubmitInfo withWaitSemaphores(VulkanSemaphoreSubmitInfo... elements)
      Copy the current immutable object with elements that replace the content of waitSemaphores.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withWaitSemaphores

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

      public final JCSwapchainSubmitInfo withSignalSemaphores(VulkanSemaphoreSubmitInfo... elements)
      Copy the current immutable object with elements that replace the content of signalSemaphores.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSignalSemaphores

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

      public boolean equals(Object another)
      This instance is equal to all instances of JCSwapchainSubmitInfo 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: commandBuffers, waitSemaphores, signalSemaphores.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static JCSwapchainSubmitInfo.Builder builder()
      Creates a builder for JCSwapchainSubmitInfo.
      JCSwapchainSubmitInfo.builder()
         .addCommandBuffers|addAllCommandBuffers(com.io7m.jcoronado.api.VulkanCommandBufferType) // commandBuffers elements
         .addWaitSemaphores|addAllWaitSemaphores(com.io7m.jcoronado.api.VulkanSemaphoreSubmitInfo) // waitSemaphores elements
         .addSignalSemaphores|addAllSignalSemaphores(com.io7m.jcoronado.api.VulkanSemaphoreSubmitInfo) // signalSemaphores elements
         .build();
      
      Returns:
      A new JCSwapchainSubmitInfo builder