pub trait BufferLayout {
// Required methods
fn attributes() -> Vec<VertexAttribute>;
fn default_buffer() -> BufferData;
fn stride() -> usize;
fn with_capacity(
vertex_capacity: usize,
index_capacity: usize,
) -> BufferData;
}Required Methods§
Sourcefn attributes() -> Vec<VertexAttribute>
fn attributes() -> Vec<VertexAttribute>
WGPU’s Shader Attributes
Sourcefn default_buffer() -> BufferData
fn default_buffer() -> BufferData
Default Buffer set to a large size.
Sourcefn with_capacity(vertex_capacity: usize, index_capacity: usize) -> BufferData
fn with_capacity(vertex_capacity: usize, index_capacity: usize) -> BufferData
Creates a Buffer at a capacity Capacity is a count of objects.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.