lovr.graphics.triangle

Draws triangles from a list of points.

lovr.graphics.triangle(mode, x, y, z, ...)

Arguments

NameTypeDescription
modeDrawStyleHow to draw the triangle.
xnumberThe x coordinate of a vertex.
ynumberThe y coordinate of a vertex.
znumberThe z coordinate of a vertex.
...numberMore vertices.

Returns

Nothing


lovr.graphics.triangle(material, x, y, z, ...)

Arguments

NameTypeDescription
materialMaterialThe Material to apply.
xnumberThe x coordinate of a vertex.
ynumberThe y coordinate of a vertex.
znumberThe z coordinate of a vertex.
...numberMore vertices.

Returns

Nothing

Notes

The number of vertices must be a multiple of three.

See also