Primitive types

Primitive types are the same in 2D and 3D primitives. Because of this, in the examples i have just written vertex 1, vertex 2 etc. The examples are in the format:
 * "vertex number - result from adding this vertex"

pr_pointlist
The vertices are a set of points. This means that each vertex will be a single pixel.

Example

 * vertex 1       - a point
 * vertex 2       - a point
 * vertex 3       - a point

pr_linelist
The vertices are a set of line segments. Each pair of vertices forms a line segment. So there must be an even set of vertices.

Example

 * vertex 1
 * vertex 2       - a line between this vertex and the previous one
 * vertex 3
 * vertex 4       - a line between this vertex and the previous one

pr_linestrip
The vertices form a polyline with the first connected to the second, the second to the third, etc. The last one is not connected to the first one. You have to specify an extra copy of the first vertex for this.

Example

 * vertex 1
 * vertex 2       - a line between this vertex and the previous one
 * vertex 3       - a line between this vertex and the previous one
 * vertex 4       - a line between this vertex and the previous one

pr_trianglelist
The vertices are a set of triangles. Each triple of vertices forms a triangle. So the number of vertices must be a multiple of 3.

Example

 * vertex 1
 * vertex 2
 * vertex 3       - a triangle formed with this vertex and the 2 previous ones
 * vertex 4
 * vertex 5
 * vertex 6       - a triangle formed with this vertex and the 2 previous ones

pr_trianglestrip
The vertices again form triangles but this time it works slightly different. The first three form the first triangle. The last two of these vertices, together with the next vertex, form the second triangle, etc. So each new vertex specifies a new triangle, connected to the previous one.

Example

 * vertex 1
 * vertex 2
 * vertex 3       - a triangle formed with this vertex and the 2 previous ones
 * vertex 4       - a triangle formed with this vertex and the 2 previous ones
 * vertex 5       - a triangle formed with this vertex and the 2 previous ones

pr_trianglefan
Similar to a triangle list but this time the first vertex is part of all the triangles. Again, each new vertex specifies a new triangle, connected to the previous vertex and the first vertex.

Example

 * vertex 1
 * vertex 2
 * vertex 3       - a triangle formed with this vertex, the previous one and the first one
 * vertex 4       - a triangle formed with this vertex, the previous one and the first one
 * vertex 5       - a triangle formed with this vertex, the previous one and the first one