[][src]Enum gfx::IndexBuffer

pub enum IndexBuffer<R: Resources> {
    Auto,
    Index16(Buffer<R, u16>),
    Index32(Buffer<R, u32>),
}

Type of index-buffer used in a Slice.

The Auto variant represents a hypothetical index-buffer from 0 to infinity. In other words, all vertices get processed in order. Do note that the Slice's start and end restrictions still apply for this variant. To render every vertex in the VertexBuffer, you would set start to 0, and end to the VertexBuffer's length.

The Index* variants represent an actual Buffer with a list of vertex-indices. The numeric suffix specifies the amount of bits to use per index. Each of these also contains a base-vertex. This is the index of the first vertex in the VertexBuffer. This value will be added to every index in the index-buffer, effectively moving the start of the VertexBuffer to this base-vertex.

Construction & Handling

A IndexBuffer can be constructed using the IntoIndexBuffer trait, from either a slice or a Buffer of integers, using a factory.

An IndexBuffer is exclusively used to create Slices.

Variants

Auto

Represents a hypothetical index-buffer from 0 to infinity. In other words, all vertices get processed in order.

Index16(Buffer<R, u16>)

An index-buffer with unsigned 16 bit indices.

Index32(Buffer<R, u32>)

An index-buffer with unsigned 32 bit indices.

Trait Implementations

impl<R: Resources> IntoIndexBuffer<R> for IndexBuffer<R>[src]

impl<R: Eq + Resources> Eq for IndexBuffer<R>[src]

impl<R: Clone + Resources> Clone for IndexBuffer<R>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<R: PartialEq + Resources> PartialEq<IndexBuffer<R>> for IndexBuffer<R>[src]

impl<R: Resources> Default for IndexBuffer<R>[src]

impl<R: Hash + Resources> Hash for IndexBuffer<R>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<R: Debug + Resources> Debug for IndexBuffer<R>[src]

Auto Trait Implementations

impl<R> Send for IndexBuffer<R> where
    <R as Resources>::Buffer: Send + Sync,
    <R as Resources>::Mapping: Send

impl<R> Sync for IndexBuffer<R> where
    <R as Resources>::Buffer: Send + Sync,
    <R as Resources>::Mapping: Send

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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