Skip to content

Commit

Permalink
Added Swapchain resize
Browse files Browse the repository at this point in the history
Also fixed Camera
  • Loading branch information
Snowiiii committed Jan 7, 2024
1 parent a4dfe49 commit 8d7eb4b
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 69 deletions.
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/vent-assets/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ impl Model3D {

pub fn destroy(&mut self, instance: &VulkanInstance) {
self.meshes
.iter_mut()
.for_each(|mesh| mesh.destroy(instance.descriptor_pool, &instance.device));
.drain(..)
.for_each(|mut mesh| mesh.destroy(instance.descriptor_pool, &instance.device));
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/vent-rendering/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ impl VulkanBuffer {

pub fn destroy(&mut self, device: &ash::Device) {
unsafe {
device.free_memory(self.buffer_memory, None);
device.destroy_buffer(self.buffer, None);
device.free_memory(self.buffer_memory, None); // Free Memory after buffer destruction!
}
}
}
Expand Down
Loading

0 comments on commit 8d7eb4b

Please sign in to comment.