Enum grr::InputRate

source ·
pub enum InputRate {
    Vertex,
    Instance {
        divisor: usize,
    },
}
Expand description

Vertex attribute addresssing.

Specifies if the vertex attribute address depends on vertex index or instance index.

Variants

Vertex

Vertex index addressing.

Attribute data is fetched from the bound vertex buffers depending on the current vertex index.

Instance

Fields

divisor: usize

Instance index addressing.

Attribute data is fetched from the bound vertex buffers depending on the current instance index. The divisor further defines how many consecutive instances will use the same vertex attribute data. The instance index will be divided by the divisor to donate the addressing index.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.