pub struct VertexAttribute {
pub name: &'static str,
pub layout_location: Option<usize>,
pub attribute_type: VertexAttributeType,
pub item_count: usize,
}
Fields§
§name: &'static str
Attribute name of the vertex attribute in the vertex shader, i.e. "vAttrXY"
layout_location: Option<usize>
If the vertex shader has a specific location, (like layout(location = 2) vAttrXY
),
use this instead of the name to look up the uniform location.
attribute_type: VertexAttributeType
Type of items of this attribute (i.e. for a FloatVec2
, would be VertexAttributeType::Float
)
item_count: usize
Number of items of this attribute (i.e. for a FloatVec2
, would be 2
(= 2 consecutive f32 values))
Implementations§
Source§impl VertexAttribute
impl VertexAttribute
pub fn get_stride(&self) -> usize
Trait Implementations§
Source§impl Clone for VertexAttribute
impl Clone for VertexAttribute
Source§fn clone(&self) -> VertexAttribute
fn clone(&self) -> VertexAttribute
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VertexAttribute
impl Debug for VertexAttribute
Source§impl Hash for VertexAttribute
impl Hash for VertexAttribute
Source§impl Ord for VertexAttribute
impl Ord for VertexAttribute
Source§fn cmp(&self, other: &VertexAttribute) -> Ordering
fn cmp(&self, other: &VertexAttribute) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VertexAttribute
impl PartialEq for VertexAttribute
Source§impl PartialOrd for VertexAttribute
impl PartialOrd for VertexAttribute
impl Copy for VertexAttribute
impl Eq for VertexAttribute
impl StructuralPartialEq for VertexAttribute
Auto Trait Implementations§
impl Freeze for VertexAttribute
impl RefUnwindSafe for VertexAttribute
impl Send for VertexAttribute
impl Sync for VertexAttribute
impl Unpin for VertexAttribute
impl UnwindSafe for VertexAttribute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)