Trait luminance::vertex::Vertex [−][src]
pub unsafe trait Vertex: Copy {
const ATTR_COUNT: usize;
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
.
Associated Constants
const ATTR_COUNT: usize
const ATTR_COUNT: usize
Number of attributes.
Required methods
fn vertex_desc() -> VertexDesc
fn vertex_desc() -> VertexDesc
The associated vertex format.