Refactor vk_swapchain
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-13 13:56:22 +01:00
parent ee8b886aec
commit 96cb003174
3 changed files with 65 additions and 32 deletions

View file

@ -5,7 +5,7 @@ pub struct VkRenderContext {
instance: VkInstance,
surface: VkSurface,
device: VkDevice,
swapchain: VkSwapchain
swapchain: VkSwapchain,
}
impl VkRenderContext {
@ -28,11 +28,11 @@ impl VkRenderContext {
let device = VkDevice::new_graphics_device(&instance, &physical_device, queue_family_index)
.expect("Unable to create device");
let swapchain = surface.create_swapchain(
let mut swapchain = surface.create_swapchain(
&window,
&instance,
&device,
&physical_device
&physical_device,
).expect("Unable to create swapchain");
// let present_queue = device.get_device_queue(0);
@ -41,7 +41,7 @@ impl VkRenderContext {
instance,
surface,
device,
swapchain
swapchain,
})
}
}