X-Git-Url: https://eleni.mutantstargoat.com/git/?p=vkrt;a=blobdiff_plain;f=src%2Fvk.h;h=140f525fc1773ace4ee1cc3cc0db35e45ffa7870;hp=7380a4080c926f2652c7119cecb64d62559ff73f;hb=526b6a7f13b31bab2b022eb9f74ec653ce4d4cd0;hpb=04881c8da046dfd0b56c42b1dfb81b8a06398c46 diff --git a/src/vk.h b/src/vk.h index 7380a40..140f525 100644 --- a/src/vk.h +++ b/src/vk.h @@ -21,6 +21,15 @@ struct vk_ctx uint8_t driverUUID[VK_UUID_SIZE]; }; +struct vk_swapchain +{ + VkSwapchainKHR swapchain; + VkSurfaceKHR surface; + VkSurfaceFormatKHR surf_fmt; + uint32_t num_images; + VkExtent2D extent2d; +}; + struct vk_image_props { uint32_t w; @@ -205,6 +214,17 @@ vk_clear_color(struct vk_ctx *ctx, uint32_t n_attachments, float x, float y, float w, float h); +/* swapchain */ + +bool +vk_create_swapchain(struct vk_ctx *ctx, + int width, int height, + int num_qfam, + struct vk_swapchain *swapchain); +void +vk_destroy_swapchain(struct vk_ctx *ctx, + struct vk_swapchain *swapchain); + /* transitions */ void