Record Class VulkanRenderModuleSwapChain.SynchronizationVulkanSemaphores

java.lang.Object
java.lang.Record
io.codetoil.curved_spacetime.render.vulkan.VulkanRenderModuleSwapChain.SynchronizationVulkanSemaphores
Record Components:
imageAcquisitionVulkanModuleSemaphore - signalled when a swap chain image is ready
renderCompleteVulkanModuleSemaphore - signalled when rendering into it has finished
Enclosing class:
VulkanRenderModuleSwapChain

public static record VulkanRenderModuleSwapChain.SynchronizationVulkanSemaphores(VulkanModuleSemaphore imageAcquisitionVulkanModuleSemaphore, VulkanModuleSemaphore renderCompleteVulkanModuleSemaphore) extends Record
The pair of semaphores that order one frame's work.

Rendering waits on the first, which the presentation engine signals once an image is available to draw into; presentation waits on the second, which the graphics queue signals once rendering has finished.

  • Constructor Details

    • SynchronizationVulkanSemaphores

      public SynchronizationVulkanSemaphores(VulkanModuleLogicalDevice vulkanModuleLogicalDevice)
      Creates both semaphores on the given device.
      Parameters:
      vulkanModuleLogicalDevice - the device to create the semaphores on
    • SynchronizationVulkanSemaphores

      public SynchronizationVulkanSemaphores(VulkanModuleSemaphore imageAcquisitionVulkanModuleSemaphore, VulkanModuleSemaphore renderCompleteVulkanModuleSemaphore)
      Creates an instance of a SynchronizationVulkanSemaphores record class.
      Parameters:
      imageAcquisitionVulkanModuleSemaphore - the value for the imageAcquisitionVulkanModuleSemaphore record component
      renderCompleteVulkanModuleSemaphore - the value for the renderCompleteVulkanModuleSemaphore record component
  • Method Details

    • cleanup

      public void cleanup()
      Destroys both semaphores.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • imageAcquisitionVulkanModuleSemaphore

      public VulkanModuleSemaphore imageAcquisitionVulkanModuleSemaphore()
      Returns the value of the imageAcquisitionVulkanModuleSemaphore record component.
      Returns:
      the value of the imageAcquisitionVulkanModuleSemaphore record component
    • renderCompleteVulkanModuleSemaphore

      public VulkanModuleSemaphore renderCompleteVulkanModuleSemaphore()
      Returns the value of the renderCompleteVulkanModuleSemaphore record component.
      Returns:
      the value of the renderCompleteVulkanModuleSemaphore record component