2019-07-12 04:15:25 +00:00
|
|
|
#ifndef __QF_Vulkan_swapchain_h
|
|
|
|
#define __QF_Vulkan_swapchain_h
|
|
|
|
|
|
|
|
typedef struct qfv_swapchain_s {
|
2020-02-07 02:45:05 +00:00
|
|
|
struct qfv_device_s *device;
|
2019-07-12 04:15:25 +00:00
|
|
|
VkSurfaceKHR surface;
|
|
|
|
VkSwapchainKHR swapchain;
|
2020-02-17 11:29:35 +00:00
|
|
|
VkFormat format;
|
|
|
|
VkExtent2D extent;
|
2019-07-12 04:15:25 +00:00
|
|
|
int32_t numImages;
|
2020-02-17 11:29:35 +00:00
|
|
|
struct qfv_imageset_s *images;
|
|
|
|
struct qfv_imageviewset_s *imageViews;
|
2019-07-12 04:15:25 +00:00
|
|
|
} qfv_swapchain_t;
|
|
|
|
|
|
|
|
struct vulkan_ctx_s;
|
|
|
|
qfv_swapchain_t *QFV_CreateSwapchain (struct vulkan_ctx_s *ctx,
|
|
|
|
VkSwapchainKHR old_swapchain);
|
2019-07-12 15:36:21 +00:00
|
|
|
void QFV_DestroySwapchain (qfv_swapchain_t *swapchain);
|
2020-02-14 02:11:27 +00:00
|
|
|
struct qfv_semaphore_s;
|
|
|
|
struct qfv_fence_s;
|
2020-02-17 11:29:35 +00:00
|
|
|
int QFV_AcquireNextImage (qfv_swapchain_t *swapchain, VkSemaphore semaphore,
|
|
|
|
VkFence fence, uint32_t *imageIndex);
|
2019-07-12 04:15:25 +00:00
|
|
|
|
|
|
|
#endif//__QF_Vulkan_swapchain_h
|