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
IndexBufferA buffer uploaded in video memory.
Fields
buffer: BufferAnySlice<'a> | The buffer. |
data_type: IndexType | Type of indices in the buffer. |
primitives: PrimitiveType | Type of primitives contained in the vertex source. |
MultidrawArrayUse a multidraw indirect buffer without indices.
Fields
buffer: BufferAnySlice<'a> | The buffer. |
primitives: PrimitiveType | Type of primitives contained in the vertex source. |
MultidrawElementUse a multidraw indirect buffer with indices.
Fields
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. |
NoIndicesDon't use indices. Assemble primitives by using the order in which the vertices are in the vertices source.
Fields
primitives: PrimitiveType | Type of primitives contained in the vertex source. |
Methods
impl<'a> IndicesSource<'a>[src]
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[src]
fn from(buf: &'a IndexBuffer<T>) -> IndicesSource<'a>
Performs the conversion.
impl<'a, T> From<IndexBufferSlice<'a, T>> for IndicesSource<'a> where T: Index[src]
fn from(buf: IndexBufferSlice<'a, T>) -> IndicesSource<'a>
Performs the conversion.
impl<'a, 'r, T> From<&'r IndexBufferSlice<'a, T>> for IndicesSource<'a> where T: Index[src]
fn from(buf: &'r IndexBufferSlice<'a, T>) -> IndicesSource<'a>
Performs the conversion.
impl<'a> From<&'a IndexBufferAny> for IndicesSource<'a>[src]
fn from(buf: &'a IndexBufferAny) -> IndicesSource<'a>
Performs the conversion.
impl<'a> Clone for IndicesSource<'a>[src]
fn clone(&self) -> IndicesSource<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<'a> From<NoIndices> for IndicesSource<'a>[src]
fn from(marker: NoIndices) -> IndicesSource<'a>
Performs the conversion.
impl<'a, 'b> From<&'b NoIndices> for IndicesSource<'a>[src]
fn from(marker: &'b NoIndices) -> IndicesSource<'a>
Performs the conversion.