Minor refactors
This commit is contained in:
@@ -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 -----------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user