love.graphics.newMesh
Creates a new Mesh.

Use Mesh:setTexture if the Mesh should be textured with an Image or Canvas when it's drawn.

In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
mesh = love.graphics.newMesh( vertices, mode, usage )
vertices table The table filled with vertex information tables for each vertex as follows:
vertices.1 number The position of the vertex on the x-axis.
vertices.2 number The position of the vertex on the y-axis.
vertices.3 (0) number The u texture coordinate of the vertex. Texture coordinates are normally in the range of 1, but can be greater or less (see WrapMode.)
vertices.4 (0) number The v texture coordinate of the vertex. Texture coordinates are normally in the range of 1, but can be greater or less (see WrapMode.)
vertices.5 (1) number The red component of the vertex color.
vertices.6 (1) number The green component of the vertex color.
vertices.7 (1) number The blue component of the vertex color.
vertices.8 (1) number The alpha component of the vertex color.
mode ('fan') MeshDrawMode How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
usage ('dynamic') SpriteBatchUsage The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance.
mesh Mesh The new mesh.
mesh = love.graphics.newMesh( vertexcount, mode, usage )
vertexcount number The total number of vertices the Mesh will use. Each vertex is initialized to {0,0, 0,0, 1,1,1,1}.
mode ('fan') MeshDrawMode How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
usage ('dynamic') SpriteBatchUsage The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance.
mesh Mesh The new mesh.
mesh = love.graphics.newMesh( vertexformat, vertices, mode, usage )
vertexformat table A table in the form of {attribute, ...}. Each attribute is a table which specifies a custom vertex attribute used for each vertex.
vertexformat.attribute table A table containing the attribute's name, it's data type, and the number of components in the attribute, in the form of {name, datatype, components}.
vertexformat.... table Additional vertex attribute format tables.
vertices table The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}.
vertices.attributecomponent number The first component of the first vertex attribute in the vertex.
vertices.... number Additional components of all vertex attributes in the vertex.
mode ('fan') MeshDrawMode How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
usage ('dynamic') SpriteBatchUsage The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance.
mesh Mesh The new mesh.
mesh = love.graphics.newMesh( vertexformat, vertexcount, mode, usage )
vertexformat table A table in the form of {attribute, ...}. Each attribute is a table which specifies a custom vertex attribute used for each vertex.
vertexformat.attribute table A table containing the attribute's name, it's data type, and the number of components in the attribute, in the form of {name, datatype, components}.
vertexformat.... table Additional vertex attribute format tables.
vertexcount number The total number of vertices the Mesh will use.
mode ('fan') MeshDrawMode How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
usage ('dynamic') SpriteBatchUsage The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance.
mesh Mesh The new mesh.
mesh = love.graphics.newMesh( vertexcount, texture, mode )
vertexcount number The total number of vertices the Mesh will use. Each vertex is initialized to {0,0, 0,0, 255,255,255,255}.
texture (nil) Texture The Image or Canvas to use when drawing the Mesh. May be nil to use no texture.
mode ('fan') MeshDrawMode How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
mesh Mesh The new mesh.