Class JCSwapchainManager
java.lang.Object
com.io7m.jcoronado.utility.swapchain.JCSwapchainManager
- All Implemented Interfaces:
JCSwapchainManagerType, AutoCloseable
The swapchain manager.
-
Method Summary
Modifier and TypeMethodDescriptionacquire()Acquire a swapchain image.voidclose()static JCSwapchainManagerTypecreate(JCSwapchainConfiguration configuration) Create a swapchain manager.events()Get a set comprising the indices of the swapchain.
-
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 swapchain image. The method is guaranteed to return an image that is usable (if not necessarily optimal) on the current device. In the case of an image being suboptimal, the swapchain will automatically be recreated at the earliest possible opportunity.- Specified by:
acquirein interfaceJCSwapchainManagerType- Returns:
- A swapchain image
- Throws:
VulkanException- On errors
-
imageIndices
Description copied from interface:JCSwapchainManagerTypeGet a set comprising the indices of the swapchain. This can be used as an index into a map to store per-frame resources externally.- Specified by:
imageIndicesin interfaceJCSwapchainManagerType- Returns:
- The set of swapchain image indices
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceJCSwapchainManagerType- Throws:
VulkanException
-