ascending_graphics

Trait BufferLayout

Source
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.

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.

Implementors§