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§

source

fn attributes() -> Vec<VertexAttribute>

WGPU’s Shader Attributes

source

fn default_buffer() -> BufferData

Default Buffer set to a large size.

source

fn stride() -> usize

The size in bytes the vertex is

source

fn with_capacity(vertex_capacity: usize, index_capacity: usize) -> BufferData

Creates a Buffer at a capacity Capacity is a count of objects.

Object Safety§

This trait is not object safe.

Implementors§