Mesh:getVertexFormat
Available since LÖVE 0.10.0
This function is not supported in earlier versions.
Gets the vertex format that the Mesh was created with.
Function
Synopsis
1 | format = Mesh:getVertexFormat( ) |
Arguments
None.
Returns
table format
- The vertex format of the Mesh, which is a table containing tables for each vertex attribute the Mesh was created with, in the form of
{attribute, ...}
.table attribute
- 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}
. table ...
- Additional vertex attributes in the Mesh.
Notes
If a Mesh wasn't created with a custom vertex format, it will have the following vertex format:
1 2 3 4 5 | defaultformat = { {"VertexPosition", "float", 2}, -- The x,y position of each vertex. {"VertexTexCoord", "float", 2}, -- The u,v texture coordinates of each vertex. {"VertexColor", "byte", 4} -- The r,g,b,a color of each vertex. } |
Please login to continue.