Rename bufferbuilder usage setter

This commit is contained in:
Jarrod Doyle 2023-09-08 15:39:05 +01:00
parent d2de478096
commit e85023858c
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ impl<'a> BulkBufferBuilder<'a> {
}
}
pub fn with_usage(mut self, usage: wgpu::BufferUsages) -> Self {
pub fn set_usage(mut self, usage: wgpu::BufferUsages) -> Self {
self.current_usage = usage;
self
}

View File

@ -111,13 +111,13 @@ impl BrickmapManager {
let mut buffers = gfx::BulkBufferBuilder::new()
.with_bytemuck_buffer("Brick World State", &[state_uniform])
.with_usage(wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST)
.set_usage(wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST)
.with_bytemuck_buffer("Brickgrid", &brickgrid)
.with_bytemuck_buffer("Brickmap Cache", &brickmap_cache)
.with_bytemuck_buffer("Shading Table", &shading_table)
.with_bytemuck_buffer("Brickgrid Unpack", &brickgrid_upload_data)
.with_bytemuck_buffer("Brickmap Unpack", &brickmap_upload_data)
.with_usage(
.set_usage(
wgpu::BufferUsages::STORAGE
| wgpu::BufferUsages::COPY_DST
| wgpu::BufferUsages::COPY_SRC,