[][src]Struct web_glitz::pipeline::graphics::VertexAttributeDescriptor

pub struct VertexAttributeDescriptor {
    pub location: u32,
    pub offset_in_bytes: u8,
    pub format: VertexAttributeFormat,
}

Describes how the data for an input attribute in a [VertexShader] is sourced from vertex buffers.

See also VertexInputLayoutDescriptor.

Fields

location: u32

The shader location of the attribute described by this VertexAttributeDescriptor.

For example, if the location is 1, then this VertexAttributeDescriptor describes how data is sourced for values of the attribute at shader attribute location 1. In GLSL, the location for an attribute may be specified with the layout qualifier:

layout(location=1) in vec4 position;
offset_in_bytes: u8

The offset in bytes of the first value in the attribute value sequence relative to the start of a [VertexInputDescriptor].

The byte-sequence for the first attribute value begins at this offset. Subsequent attribute values are obtained by adding a stride to the base offset.

format: VertexAttributeFormat

The data format in which the attribute values are stored.

Should be a format that is compatible with the type used for the attribute in the shader, see also VertexAttributeFormat::is_compatible.

Trait Implementations

impl Clone for VertexAttributeDescriptor[src]

impl Copy for VertexAttributeDescriptor[src]

impl Debug for VertexAttributeDescriptor[src]

impl Hash for VertexAttributeDescriptor[src]

impl PartialEq<VertexAttributeDescriptor> for VertexAttributeDescriptor[src]

impl StructuralPartialEq for VertexAttributeDescriptor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.