Table of Contents

Enum PrimitiveType

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Values that indicate how the graphics pipeline interprets input vertex data.

[DataContract]
public enum PrimitiveType
Extension Methods

Fields

LineList = 2

The data is ordered as a sequence of line segments; each line segment is described by two new vertices.
The count may be any positive even integer.

LineListWithAdjacency = 10

The data is ordered as a sequence of line segments, the same as LineList, but including adjacency information that can be useful for Geometry Shaders; each line segment is described by two new vertices.
The count may be any positive even integer.

LineStrip = 3

The data is ordered as a sequence of line segments; each line segment is described by one new vertex and the last vertex from the previous line seqment.
The count may be any positive integer greater than 2.

LineStripWithAdjacency = 11

The data is ordered as a sequence of line segments, the same as LineStrip, but including adjacency information that can be useful for Geometry Shaders; each line segment is described by one new vertex and the last vertex from the previous line seqment.
The count may be any positive integer greater than 2.

PatchList = 33

The data is ordered as a sequence of patches, each one being a group of control points. This is used for tessellation, where the Hull Shader processes each patch and determines tesselation factors, optionally outputting more control point data.
To indicate the number of control points in each patch, you can use the helper method ControlPointCount(PrimitiveType, int).
These topologies unlock a lot of flexibility for surfaces like terrain, curved surfaces, or even animation rigs.

PointList = 1

The data is ordered as a sequence of points, with no connectivity between them.
This is useful for rendering particles or point clouds.
The count may be any positive integer.

TriangleList = 4

The data is ordered as a sequence of triangles; each triangle is described by three new vertices. Most commonly used for rendering 3D models.
The count may be any positive integer multiple of 3.
Back-face culling is affected by the current winding-order Render State.

TriangleListWithAdjacency = 12

The data is ordered as a sequence of triangles, the same as TriangleList, but including adjacency information that can be useful for Geometry Shaders; each triangle is described by three new vertices. Most commonly used for rendering 3D models.
The count may be any positive integer multiple of 3.
Back-face culling is affected by the current winding-order Render State.

TriangleStrip = 5

The data is ordered as a sequence of triangles; each triangle is described by two new vertices and one vertex from the previous triangle.
It is usually more space-efficient than a triangle list due to reduced vertex redundancy.
The back-face culling flag is flipped automatically on even-numbered triangles.

TriangleStripWithAdjacency = 13

The data is ordered as a sequence of triangles, the same as TriangleStrip, but including adjacency information that can be useful for Geometry Shaders; each triangle is described by two new vertices and one vertex from the previous triangle.
It is usually more space-efficient than a triangle list due to reduced vertex redundancy.
The back-face culling flag is flipped automatically on even-numbered triangles.

Undefined = 0

The graphics pipeline has not been initialized with a specific primitive topology.
The Input-Assembler stage will not function properly unless a primitive type is defined.