#[repr(C)]pub struct VertexAttribute {
pub va_name: AzString,
pub layout_location: OptionUsize,
pub attribute_type: VertexAttributeType,
pub item_count: usize,
}Fields§
§va_name: AzStringAttribute name of the vertex attribute in the vertex shader, i.e. "vAttrXY"
layout_location: OptionUsizeIf 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: VertexAttributeTypeType of items of this attribute (i.e. for a FloatVec2, would be
VertexAttributeType::Float)
item_count: usizeNumber 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 duplicate 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 FromIterator<VertexAttribute> for VertexAttributeVec
impl FromIterator<VertexAttribute> for VertexAttributeVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = VertexAttribute>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = VertexAttribute>,
Creates a value from an iterator. Read more
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 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 UnsafeUnpin 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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more