It works!

This commit is contained in:
2025-11-26 15:47:02 +01:00
parent 9f2d1e4608
commit b9a804ead6
8 changed files with 150 additions and 88 deletions

View File

@@ -195,16 +195,12 @@ pub fn recreate(self: *Swapchain, engine: *Engine) !void {
self.swapchain_images = new_swapchain_images;
self.image_index = res.image_index;
self.semaphore_image_acquired = semaphore_image_acquired;
std.log.debug("Swapchain recreated.", .{});
}
pub fn present(self: *Swapchain, engine: *Engine, command_buffer: vk.CommandBuffer) !PresentResult {
const device = engine.device;
const mode = &engine.mode.surface;
std.log.debug("Presenting command buffer {X}.", .{@intFromEnum(command_buffer)});
// --- WAIT FOR CURRENT FRAME TO FINISH ------------------------------------
const current_swapchain_image = &self.swapchain_images[self.image_index];