pub struct VertexAttrib {
    pub size: u32,
    pub offset: u32,
    pub vtype: VertexAttribType,
    pub normalize: bool,
    pub name: String,
}
Expand description

A abstract representation of a vertex attribute

Example

let attrib = VertexAttrib::new(
      VertexAttribType::Float3, // We want to send a vector3
      false, // normalize
      "pos".to_string(), // the name is only to know the which attribute is to the end user
)

Fields

size: u32offset: u32vtype: VertexAttribTypenormalize: boolname: String

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.