Module glium::index

source ·
Expand description

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

Enums

Traits

  • An index from the index buffer.