From 7f14138e1baa2c40fb30d90ebcd45ad17b12e0a3 Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Mon, 9 Sep 2024 00:30:29 -0700 Subject: Fixing swapchain --- src/vulkan_swapchain.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/vulkan_swapchain.h') diff --git a/src/vulkan_swapchain.h b/src/vulkan_swapchain.h index 509753f..b15028f 100644 --- a/src/vulkan_swapchain.h +++ b/src/vulkan_swapchain.h @@ -26,11 +26,20 @@ struct Swapchain { VkImage swapchain_images[SWAPCHAIN_IMAGE_COUNT]; VkImageView swapchain_image_views[SWAPCHAIN_IMAGE_COUNT]; VkFramebuffer framebuffers[SWAPCHAIN_IMAGE_COUNT]; + VkSemaphore image_available_semaphores[SWAPCHAIN_IMAGE_COUNT]; + VkSemaphore render_finished_semaphores[SWAPCHAIN_IMAGE_COUNT]; + CommandBuffer cmd_buf; Texture2D upload_texture; + ImGuiContext *imgui_context = nullptr; + uint32_t semaphore_index = 0; + uint32_t frame_index = 0; + void resize(uint32_t new_width, uint32_t new_height); - Swapchain(GLFWwindow *window, iris::Device device); + void start_frame(); + void display(Texture2D &texture); + Swapchain(GLFWwindow *window, iris::Device device, uint32_t width, uint32_t height); ~Swapchain(); }; -- cgit v1.2.3-70-g09d2