Minor refactors

This commit is contained in:
2026-05-22 23:34:25 +02:00
parent ad80fb4fd9
commit fd311b97e7
6 changed files with 145 additions and 118 deletions

View File

@@ -218,6 +218,10 @@ pub fn acquire(self: *Swapchain) !void {
self.image_index = res.image_index;
}
pub fn getCurrentSwapchainImage(self: *Swapchain) *const SwapchainImage {
return &self.swapchain_images[self.image_index.?];
}
pub const PresentInfo = struct {
command_buffer: CommandBuffer,
wait_semaphores: []const WaitSemaphore = &.{},
@@ -227,7 +231,7 @@ pub fn present(self: *Swapchain, present_info: PresentInfo) !void {
const allocator_frame = ctx.allocator_frame;
const engine = ctx.engine;
const current_swapchain_image = &self.swapchain_images[self.image_index.?];
const current_swapchain_image = self.getCurrentSwapchainImage();
// --- SUBMIT COMMAND BUFFER -----------------------------------------------