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

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

buffer

The buffer.

data_type

Type of indices in the buffer.

primitives

Type of primitives contained in the vertex source.

MultidrawArray

Use a multidraw indirect buffer without indices.

Fields

buffer

The buffer.

primitives

Type of primitives contained in the vertex source.

MultidrawElement

Use a multidraw indirect buffer with indices.

Fields

commands

The buffer of the commands.

indices

The buffer of the indices.

data_type

Type of indices in the buffer.

primitives

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

primitives

Type of primitives contained in the vertex source.

Methods

impl<'a> IndicesSource<'a>

fn get_primitives_type(&self) -> PrimitiveType

Returns the type of the primitives.

Trait Implementations

impl<'a, T> From<&'a IndexBuffer<T>> for IndicesSource<'a> where T: Index

fn from(buf: &'a IndexBuffer<T>) -> IndicesSource<'a>

impl<'a, T> From<IndexBufferSlice<'a, T>> for IndicesSource<'a> where T: Index

fn from(buf: IndexBufferSlice<'a, T>) -> IndicesSource<'a>

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

fn from(buf: &'r IndexBufferSlice<'a, T>) -> IndicesSource<'a>

impl<'a> From<&'a IndexBufferAny> for IndicesSource<'a>

fn from(buf: &'a IndexBufferAny) -> IndicesSource<'a>

impl<'a> From<NoIndices> for IndicesSource<'a>

fn from(marker: NoIndices) -> IndicesSource<'a>

impl<'a, 'b> From<&'b NoIndices> for IndicesSource<'a>

fn from(marker: &'b NoIndices) -> IndicesSource<'a>

Derived Implementations

impl<'a> Clone for IndicesSource<'a>

fn clone(&self) -> IndicesSource<'a>

fn clone_from(&mut self, source: &Self)