Garry's Mod Wiki

MATERIAL

Description

Enumerations used by mesh.Begin to control what type of vertex information it should expect. Clientside only.

For more information, see the Mesh Primitives reference page.

Values

MATERIAL_POINTS0
The primitive type MATERIAL_POINTS does not currently work and will not produce any visual effect if used.

For more information, see Point Primitives

MATERIAL_LINES1
The primitive type MATERIAL_LINES does not currently work and will not produce any visual effect if used.

For more information, see Line Primitives

MATERIAL_TRIANGLES2Creates triangles from groupings of 3 vertices.

TThe primitiveCount argument of mesh.Begin should be the total number of triangles that the Mesh will contain.
E.g. (vertexCount / 3)

For more information, see Triangle Primitives

MATERIAL_TRIANGLE_STRIP3Creates a set of triangles that each share two vertices with the previous triangle in the sequence.

The primitiveCount argument of mesh.Begin should be the total number of triangles that the Mesh will contain.
E.g. (vertexCount - 2)

For more information, see Triangle Strip Primitives

MATERIAL_LINE_STRIP4
The primitive type MATERIAL_LINE_STRIP does not currently work and will not produce any visual effect if used.

For more information, see Line Strip Primitives

MATERIAL_LINE_LOOP5
The primitive type MATERIAL_LINE_LOOP does not currently work and will not produce any visual effect if used.

For more information, see Line Loop Primitives

MATERIAL_POLYGON6Creates a set of triangles that all share a single vertex and each share a vertex with the previous triangle.

The primitiveCount argument of mesh.Begin should be the total number of vertices that the Mesh will contain.
E.g. (vertexCount)

For more information, see Polygon Primitives

MATERIAL_QUADS7Creates pairs of triangles that share two vertices.

The primitiveCount argument of mesh.Begin should be the total number of quads that the Mesh will contain.
E.g. (vertexCount / 4)

For more information, see Quad Primitives