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: u32
§offset: u32
§vtype: VertexAttribType
§normalize: bool
§name: String
Implementations§
Source§impl VertexAttrib
impl VertexAttrib
pub fn new(vtype: VertexAttribType, normalize: bool, name: String) -> Self
Auto Trait Implementations§
impl Freeze for VertexAttrib
impl RefUnwindSafe for VertexAttrib
impl Send for VertexAttrib
impl Sync for VertexAttrib
impl Unpin for VertexAttrib
impl UnwindSafe for VertexAttrib
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more