Struct easy_opengl::buffers::VertexAttrib
source · 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
sourceimpl VertexAttrib
impl VertexAttrib
pub fn new(vtype: VertexAttribType, normalize: bool, name: String) -> Self
Auto Trait Implementations
impl RefUnwindSafe for VertexAttrib
impl Send for VertexAttrib
impl Sync for VertexAttrib
impl Unpin for VertexAttrib
impl UnwindSafe for VertexAttrib
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more