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:
PointsListLinesListLinesListAdjacencyLineStripLineStripAdjacencyTrianglesListTrianglesListAdjacencyTriangleStripTriangleStripAdjacencyTriangleFanPatches
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§
- Draw
Command Indices - Represents an element in a list of draw commands.
- Draw
Command NoIndices - Represents an element in a list of draw commands.
- Draw
Commands Indices Buffer - A buffer containing a list of draw commands.
- Draw
Commands NoIndices Buffer - A buffer containing a list of draw commands.
- Index
Buffer - A list of indices loaded in the graphics card’s memory.
- Index
Buffer Any - An
IndexBufferwithout any type information. - Index
Buffer Slice - Slice of an
IndexBuffer. - NoIndices
- Marker that can be used as an indices source when you don’t need indices.
Enums§
- Buffer
Creation Error - Error that can happen while creating an index buffer.
- Index
Type - Type of the indices in an index source.
- Indices
Source - Describes a source of indices used for drawing.
- Primitive
Type - List of available primitives.
Traits§
- Index
- An index from the index buffer.