[][src]Enum glium::index::IndicesSource

[]
pub enum IndicesSource<'a> {
    IndexBuffer {
        buffer: BufferAnySlice<'a>,
        data_type: IndexType,
        primitives: PrimitiveType,
    },
    MultidrawArray {
        buffer: BufferAnySlice<'a>,
        primitives: PrimitiveType,
    },
    MultidrawElement {
        commands: BufferAnySlice<'a>,
        indices: BufferAnySlice<'a>,
        data_type: IndexType,
        primitives: PrimitiveType,
    },
    NoIndices {
        primitives: PrimitiveType,
    },
}
[]

Describes a source of indices used for drawing.

Variants

IndexBuffer
[]

A buffer uploaded in video memory.

[]

Fields of IndexBuffer

buffer: BufferAnySlice<'a>

The buffer.

data_type: IndexType

Type of indices in the buffer.

primitives: PrimitiveType

Type of primitives contained in the vertex source.

MultidrawArray
[]

Use a multidraw indirect buffer without indices.

[]

Fields of MultidrawArray

buffer: BufferAnySlice<'a>

The buffer.

primitives: PrimitiveType

Type of primitives contained in the vertex source.

MultidrawElement
[]

Use a multidraw indirect buffer with indices.

[]

Fields of MultidrawElement

commands: BufferAnySlice<'a>

The buffer of the commands.

indices: BufferAnySlice<'a>

The buffer of the indices.

data_type: IndexType

Type of indices in the buffer.

primitives: PrimitiveType

Type of primitives contained in the vertex source.

NoIndices
[]

Don't use indices. Assemble primitives by using the order in which the vertices are in the vertices source.

[]

Fields of NoIndices

primitives: PrimitiveType

Type of primitives contained in the vertex source.

Implementations

impl<'a> IndicesSource<'a>[src][]

pub fn get_primitives_type(&self) -> PrimitiveType[src][]

Returns the type of the primitives.

Trait Implementations

impl<'a> Clone for IndicesSource<'a>[src][+]

impl<'a, T> From<&'a IndexBuffer<T>> for IndicesSource<'a> where
    T: Index
[src][+]

impl<'a> From<&'a IndexBufferAny> for IndicesSource<'a>[src][+]

impl<'a, 'b> From<&'b NoIndices> for IndicesSource<'a>[src][+]

impl<'a, 'r, T> From<&'r IndexBufferSlice<'a, T>> for IndicesSource<'a> where
    T: Index
[src][+]

impl<'a, T> From<IndexBufferSlice<'a, T>> for IndicesSource<'a> where
    T: Index
[src][+]

impl<'a> From<NoIndices> for IndicesSource<'a>[src][+]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for IndicesSource<'a>

impl<'a> !Send for IndicesSource<'a>

impl<'a> !Sync for IndicesSource<'a>

impl<'a> Unpin for IndicesSource<'a>

impl<'a> !UnwindSafe for IndicesSource<'a>

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<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.