Type Alias bevy::render::render_resource::BufferDescriptor
pub type BufferDescriptor<'a> = BufferDescriptor<Option<&'a str>>;
Expand description
Describes a [Buffer
].
For use with [Device::create_buffer
].
Corresponds to WebGPU GPUBufferDescriptor
.
Aliased Type§
struct BufferDescriptor<'a> {
pub label: Option<&'a str>,
pub size: u64,
pub usage: BufferUsages,
pub mapped_at_creation: bool,
}
Fields§
§label: Option<&'a str>
Debug label of a buffer. This will show up in graphics debuggers for easy identification.
size: u64
Size of a buffer, in bytes.
usage: BufferUsages
Usages of a buffer. If the buffer is used in any way that isn’t specified here, the operation will panic.
mapped_at_creation: bool
Allows a buffer to be mapped immediately after they are made. It does not have to be [BufferUsages::MAP_READ
] or
[BufferUsages::MAP_WRITE
], all buffers are allowed to be mapped at creation.
If this is true
, size
must be a multiple of
[COPY_BUFFER_ALIGNMENT
].
Trait Implementations§
§impl<L> Serialize for BufferDescriptor<L>where
L: Serialize,
impl<L> Serialize for BufferDescriptor<L>where L: Serialize,
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more