logo
pub unsafe trait Vertex: Copy {
    fn vertex_desc() -> VertexDesc;
}
Expand description

A type that can be used as a Vertex has to implement that trait – it must provide an associated VertexDesc value via a function call. This associated value gives enough information on the types being used as attributes to reify enough memory data to align and, size and type buffers correctly.

In theory, you should never have to implement that trait directly. Instead, feel free to use the [luminance-derive] Vertex proc-macro-derive instead.

Note: implementing this trait is unsafe.

Required Methods

The associated vertex format.

Implementations on Foreign Types

Implementors