{{newin|[[0.10.0]]|100|type=function}}
Gets the vertex format that the Mesh was [[love.graphics.newMesh|created]] with.

== Function ==
=== Synopsis ===
<source lang="lua">
format = Mesh:getVertexFormat( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|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 <code>{attribute, ...}</code>.}}
{{subparam|table|attribute|A table containing the attribute's name, it's [[AttributeDataType|data type]], and the number of components in the attribute, in the form of <code>{name, datatype, components}</code>.}}
{{subparam|table|...|Additional vertex attributes in the Mesh.}}

== Notes ==
If a Mesh wasn't [[love.graphics.newMesh|created]] with a custom vertex format, it will have the following vertex format:
<source lang="lua">
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.
}
</source>
== See Also ==
* [[parent::Mesh]]
* [[love.graphics.newMesh]]
* [[AttributeDataType]]
* [[Mesh:setVertex]]
* [[Mesh:setVertexAttribute]]
* [[love.graphics.draw]]
[[Category:Functions]]
{{#set:Description=Gets the vertex format that the Mesh was [[love.graphics.newMesh|created]] with.}}
== Other Languages ==
{{i18n|Mesh:getVertexFormat}}