Trait amethyst_renderer::vertex::VertexFormat
[−]
pub trait VertexFormat: Pod + Structure<Format> + Sized + Send + Sync { type Attributes: AsRef<[Attribute]>; type NamedAttributes: AsRef<[(&'static str, Attribute)]>; fn attributes() -> Self::Attributes; fn named_attributes<N: AttributeNames>() -> Self::NamedAttributes; fn size() -> usize { ... } fn attribute<F>() -> Attribute
where
Self: WithField<F>, { ... } }
Trait implemented by all valid vertex formats.
Associated Types
type Attributes: AsRef<[Attribute]>
Container for attributes of this format
type NamedAttributes: AsRef<[(&'static str, Attribute)]>
Container for name+attribute pairs of this format
Required Methods
fn attributes() -> Self::Attributes
Returns a list of all attributes specified in the vertex.
fn named_attributes<N: AttributeNames>() -> Self::NamedAttributes
Returns a list of all name+attribute pairs specified in the vertex. The caller provides attribute type -> Name mapping
Provided Methods
fn size() -> usize
Returns the size of a single vertex in bytes.
fn attribute<F>() -> Attribute where
Self: WithField<F>,
Self: WithField<F>,
Returns attribute of vertex by type
Implementors
impl VertexFormat for PosColor
impl VertexFormat for PosTex
impl VertexFormat for PosNormTex
impl VertexFormat for PosNormTangTex