Add Default impl for BulkBuferBuilder
This commit is contained in:
parent
8c1383792b
commit
b848b78e86
|
@ -15,12 +15,7 @@ pub struct BulkBufferBuilder<'a> {
|
|||
|
||||
impl<'a> BulkBufferBuilder<'a> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
order: vec![],
|
||||
init_descriptors: vec![],
|
||||
descriptors: vec![],
|
||||
current_usage: wgpu::BufferUsages::UNIFORM,
|
||||
}
|
||||
Self::default()
|
||||
}
|
||||
|
||||
pub fn set_usage(mut self, usage: wgpu::BufferUsages) -> Self {
|
||||
|
@ -74,6 +69,17 @@ impl<'a> BulkBufferBuilder<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Default for BulkBufferBuilder<'a> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
order: vec![],
|
||||
init_descriptors: vec![],
|
||||
descriptors: vec![],
|
||||
current_usage: wgpu::BufferUsages::UNIFORM,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait BufferExt {
|
||||
fn get_mapped_range<S: RangeBounds<wgpu::BufferAddress>, T: bytemuck::Pod>(
|
||||
&self,
|
||||
|
|
Loading…
Reference in New Issue