[−][src]Struct luminance::vertex::VertexAttribDesc
Vertex attribute format.
Vertex attributes (such as positions, colors, texture UVs, normals, etc.) have all a specific format that must be passed to the GPU. This type gathers information about a single vertex attribute and is completly agnostic of the rest of the attributes used to form a vertex.
A type is associated with a single value of type VertexAttribDesc
via the VertexAttrib
trait. If such an implementor exists for a type, it means that this type can be used as a vertex
attribute.
Fields
ty: VertexAttribType
Type of the attribute. See VertexAttribType
for further details.
dim: VertexAttribDim
Dimension of the attribute. It should be in 1–4. See VertexAttribDim
for further details.
unit_size: usize
Size in bytes that a single element of the attribute takes. That is, if your attribute has a dimension set to 2, then the unit size should be the size of a single element (not two).
align: usize
Alignment of the attribute. The best advice is to respect what Rust does, so it’s highly
recommended to use ::std::mem::align_of
to let it does the job for you.
Methods
impl VertexAttribDesc
[src]
Trait Implementations
impl Clone for VertexAttribDesc
[src]
fn clone(&self) -> VertexAttribDesc
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for VertexAttribDesc
[src]
impl Eq for VertexAttribDesc
[src]
impl PartialEq<VertexAttribDesc> for VertexAttribDesc
[src]
fn eq(&self, other: &VertexAttribDesc) -> bool
[src]
fn ne(&self, other: &VertexAttribDesc) -> bool
[src]
impl Debug for VertexAttribDesc
[src]
impl Hash for VertexAttribDesc
[src]
Auto Trait Implementations
impl Unpin for VertexAttribDesc
impl Sync for VertexAttribDesc
impl Send for VertexAttribDesc
impl UnwindSafe for VertexAttribDesc
impl RefUnwindSafe for VertexAttribDesc
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,