[−][src]Module glium::index
In order to draw, you need to provide a way for the video card to know how to link primitives together.
There are eleven types of primitives, each one with a corresponding struct:
PointsList
LinesList
LinesListAdjacency
LineStrip
LineStripAdjacency
TrianglesList
TrianglesListAdjacency
TriangleStrip
TriangleStripAdjacency
TriangleFan
Patches
There are two ways to specify the indices that must be used:
- Passing a reference to an
IndexBuffer
, which contains a list of indices. NoIndices
, in which case the vertices will be used in the order in which they are in the vertex buffer.
Multidraw indirect
In addition to indices, you can also use multidraw indirect rendering.
The idea is to put a list of things to render in a buffer, and pass that buffer to OpenGL.
Structs
DrawCommandIndices | Represents an element in a list of draw commands. |
DrawCommandNoIndices | Represents an element in a list of draw commands. |
DrawCommandsIndicesBuffer | A buffer containing a list of draw commands. |
DrawCommandsNoIndicesBuffer | A buffer containing a list of draw commands. |
IndexBuffer | A list of indices loaded in the graphics card's memory. |
IndexBufferAny | An |
IndexBufferSlice | Slice of an |
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. |