hephae_render::vertex

Trait VertexCommand

Source
pub trait VertexCommand: Send + Sync {
    type Vertex: Vertex;

    // Required method
    fn draw(&self, queuer: &mut impl VertexQueuer<Vertex = Self::Vertex>);
}
Expand description

Commands issued by Drawers that will flush out vertices and indices into buffers later.

Required Associated Types§

Source

type Vertex: Vertex

The type of vertex this command works with.

Required Methods§

Source

fn draw(&self, queuer: &mut impl VertexQueuer<Vertex = Self::Vertex>)

Push vertices and indices to be rendered. For example, drawing a triangle would be calling vertices([A, B, C]) and indices([0, 1, 2]).

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§