summaryrefslogtreecommitdiff
path: root/src/vulkan_swapchain.h
diff options
context:
space:
mode:
authorChuyan Zhang <me@zcy.moe>2024-09-09 00:30:29 -0700
committerChuyan Zhang <me@zcy.moe>2024-09-09 00:30:29 -0700
commit7f14138e1baa2c40fb30d90ebcd45ad17b12e0a3 (patch)
treed9ad5dbb2871e3999480e55ffa24bea6e50f8dd4 /src/vulkan_swapchain.h
parent2ead02037dc89e987fbc0a021fe470e29d226cfd (diff)
downloadiris-7f14138e1baa2c40fb30d90ebcd45ad17b12e0a3.tar.gz
iris-7f14138e1baa2c40fb30d90ebcd45ad17b12e0a3.zip
Fixing swapchain
Diffstat (limited to 'src/vulkan_swapchain.h')
-rw-r--r--src/vulkan_swapchain.h11
1 files changed, 10 insertions, 1 deletions
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();
};