Struct glitter::vertex_data::VertexAttribute
[−]
[src]
pub struct VertexAttribute { pub ty: VertexAttributeType, pub name: String, pub offset: usize, pub stride: usize, }
Specifies the type, name, and memory layout of a vertex attribute.
Generally, a "vertex attribute" corresponds to a field in a VertexData
struct.
Fields
ty: VertexAttributeType
The type of the vertex attribute. This also specifies the number of bytes that make up a vertex attribute.
name: String
The name of the vertex attribute. This value is used
as the $field_name
when binding vertex attribute
pointers with the attrib_pointers!
macro.
offset: usize
The number of bytes to "move" from the start of the vertex data to reach this vertex attribute.
stride: usize
The number of bytes between consecutive vertex attributes. 0 indicates that the vertex data is tightly packed.
Trait Implementations
impl Clone for VertexAttribute
[src]
fn clone(&self) -> VertexAttribute
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more