chore: buffers into vec
This commit is contained in:
parent
7be29cb3a9
commit
862f6a70c8
1 changed files with 5 additions and 8 deletions
|
|
@ -45,8 +45,7 @@ pub struct EngineInstance {
|
|||
pub pools: Pools,
|
||||
pub commandbuffers: Vec<vk::CommandBuffer>,
|
||||
pub allocator: std::mem::ManuallyDrop<BufferAllocator>,
|
||||
pub buffer1: Buffer,
|
||||
pub buffer2: Buffer,
|
||||
pub buffers: Vec<Buffer>,
|
||||
pub framecount: FrameCounter,
|
||||
}
|
||||
|
||||
|
|
@ -204,8 +203,7 @@ impl EngineInstance {
|
|||
pools,
|
||||
commandbuffers,
|
||||
allocator: std::mem::ManuallyDrop::new(allocator),
|
||||
buffer1,
|
||||
buffer2,
|
||||
buffers: vec![buffer1, buffer2],
|
||||
framecount: FrameCounter::new(),
|
||||
})
|
||||
}
|
||||
|
|
@ -218,10 +216,9 @@ impl EngineInstance {
|
|||
self.pools.cleanup(&self.device);
|
||||
self.pipeline.cleanup(&self.device);
|
||||
|
||||
self.allocator
|
||||
.free_buffer_allocation(&self.device, &mut self.buffer1);
|
||||
self.allocator
|
||||
.free_buffer_allocation(&self.device, &mut self.buffer2);
|
||||
for buffer in &mut self.buffers {
|
||||
self.allocator.free_buffer_allocation(&self.device, buffer);
|
||||
}
|
||||
std::mem::ManuallyDrop::drop(&mut self.allocator);
|
||||
|
||||
self.device.destroy_render_pass(self.renderpass, None);
|
||||
|
|
|
|||
Loading…
Reference in a new issue