Class JCSwapchainManager
java.lang.Object
com.io7m.jcoronado.utility.swapchain.JCSwapchainManager
- All Implemented Interfaces:
JCSwapchainManagerType, AutoCloseable
The swapchain manager.
-
Method Summary
Modifier and TypeMethodDescriptionacquire(JCSwapchainFrameIndex frameIndex) Acquire a frame for the given frame index.voidclose()static JCSwapchainManagerTypecreate(JCSwapchainConfiguration configuration) Create a swapchain manager.events()
-
Method Details
-
create
public static JCSwapchainManagerType create(JCSwapchainConfiguration configuration) throws VulkanException Create a swapchain manager.- Parameters:
configuration- The configuration- Returns:
- A manager
- Throws:
VulkanException- On errors
-
events
- Specified by:
eventsin interfaceJCSwapchainManagerType- Returns:
- The swapchain events
-
acquire
Description copied from interface:JCSwapchainManagerTypeAcquire a frame for the given frame index. The frame wraps a swapchain image together with the manager-owned semaphores and fences required to render and present it.The frame index is provided by the application and must index into the manager's frame-slot resources (that is, it must be in the range
[0, framesInFlight)). The manager uses the frame index to bound the re-signal of the acquire semaphore: before acquiring, it waits for the bounding fence of that frame slot, which is signalled by the submit that consumed the slot's acquire semaphore.Before acquiring, the manager checks the extent reported by the configured extent supplier. If it differs from the extent of the current swapchain, the swapchain is recreated with the new extent (clamped to the range supported by the implementation) before the frame is acquired.
- Specified by:
acquirein interfaceJCSwapchainManagerType- Parameters:
frameIndex- The frame index- Returns:
- A frame
- Throws:
VulkanException- On errors
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceJCSwapchainManagerType- Throws:
VulkanException
-