Module glium::index [] [src]

In order to draw, you need to provide a source of indices which is used to link the vertices together into primitives.

There are eleven types of primitives, each one with a corresponding struct:

These structs can be turned into an IndexBuffer, which uploads the data in video memory.

There are three ways to specify the indices that must be used:

For performances it is highly recommended to use either an IndexBuffer or NoIndices, and to avoid passing indices in RAM.

When you draw something, a draw command is sent to the GPU and the execution continues immediatly after. But if you pass indices in RAM, the execution has to block until the GPU has finished drawing in order to make sure that the indices are not free'd.

Reexports

pub use self::buffer::{IndexBuffer};

Structs

DrawCommandIndices
DrawCommandNoIndices
DrawCommandsIndicesBuffer

A buffer containing a list of draw commands.

DrawCommandsNoIndicesBuffer

A buffer containing a list of draw commands.

IndexBufferAny

An IndexBuffer without any type information.

IndexBufferSlice

Slice of an IndexBuffer.

NoIndices

Marker that can be used as an indices source when you don't need indices.

Enums

BufferCreationError

Error that can happen while creating an index buffer.

IndexType

Type of the indices in an index source.

IndicesSource

Describes a source of indices used for drawing.

PrimitiveType

List of available primitives.

Traits

Index

An index from the index buffer.