Module azul_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

Represents an element in a list of draw commands.
Represents an element in a list of draw commands.
A buffer containing a list of draw commands.
A buffer containing a list of draw commands.
A list of indices loaded in the graphics card’s memory.
An IndexBuffer without any type information.
Slice of an IndexBuffer.
Marker that can be used as an indices source when you don’t need indices.

Enums

Error that can happen while creating an index buffer.
Type of the indices in an index source.
Describes a source of indices used for drawing.
List of available primitives.

Traits

An index from the index buffer.