pub type BufferDescriptor<'a> = BufferDescriptor<Label<'a>>;Expand description
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: u64Size of a buffer, in bytes.
usage: BufferUsagesUsages of a buffer. If the buffer is used in any way that isn’t specified here, the operation will panic.
Specifying only usages the application will actually perform may increase performance.
Additionally, on the WebGL backend, there are restrictions on [BufferUsages::INDEX];
see [DownlevelFlags::UNRESTRICTED_INDEX_BUFFER] for more information.
mapped_at_creation: boolAllows 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].