Mesh:getTexture

Mesh:getTexture Available since LÖVE 0.9.1 This function is not supported in earlier versions. Gets the texture (Image or Canvas) used when drawing the Mesh. Function Synopsis texture = Mesh:getTexture( ) Arguments None. Returns Texture texture (nil) The Image or Canvas to texture the Mesh with when drawing, or nil if none is set. See Also Mesh Mesh:setTexture

Mesh:getVertex

Mesh:getVertex Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the properties of a vertex in the Mesh. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis attributecomponent, ... = Mesh:getVertex( index ) Arguments number index The index of the vertex you want to retrieve the information for. Returns number attributecomponent The first component of the first vertex attribute in the specified vertex. nu

Mesh:getVertexAttribute

Mesh:getVertexAttribute Available since LÖVE 0.10.0 This function is not supported in earlier versions. Gets the properties of a specific attribute within a vertex in the Mesh. Meshes without a custom vertex format specified in love.graphics.newMesh have position as their first attribute, texture coordinates as their second attribute, and color as their third attribute. Function Synopsis value1, value2, ... = Mesh:getVertexAttribute( vertexindex, attributeindex ) Arguments number vertexin

Mesh:getVertexCount

Mesh:getVertexCount Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the total number of vertices in the Mesh. Function Synopsis count = Mesh:getVertexCount( ) Arguments None. Returns number count The total number of vertices in the mesh. See Also Mesh Mesh:getVertex Mesh:setVertex

Mesh:getVertexFormat

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 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 comp

Mesh:getVertexMap

Mesh:getVertexMap Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. If no vertex map has been set previously via Mesh:setVertexMap, then this function will return nil in LÖVE 0.10.0+, or an empty table in 0.9.2 and older. Funct

Mesh:getVertices

Mesh:getVertices Available since LÖVE 0.9.0 and removed in LÖVE 0.10.0 Use Mesh:getVertex in a loop instead. Gets all the vertices in the Mesh. This method can be slow if the Mesh has a large number of vertices. Keep the original table used to create the Mesh around and update it when necessary instead of using this method frequently, if possible. Function Synopsis vertices = Mesh:getVertices( ) Arguments None. Returns table vertices The table filled with vertex information tables for e

Mesh:hasVertexColors

Mesh:hasVertexColors Available since LÖVE 0.9.0 and removed in LÖVE 0.10.0 It has been replaced by Mesh:isAttributeEnabled("VertexColor"). Gets whether per-vertex colors are used instead of the constant color when drawing the Mesh (constant color being love.graphics.setColor.) Per-vertex colors are enabled by default for a Mesh if at least one vertex color was not the default (255, 255, 255, 255) when the Mesh was created. Function Synopsis vertexcolors = Mesh:hasVertexColors( ) Arguments

Mesh:isAttributeEnabled

Mesh:isAttributeEnabled Available since LÖVE 0.10.0 This function is not supported in earlier versions. Gets whether a specific vertex attribute in the Mesh is enabled. Vertex data from disabled attributes is not used when drawing the Mesh. Function Synopsis enabled = Mesh:isAttributeEnabled( name ) Arguments string name The name of the vertex attribute to enable or disable. Returns boolean enabled Whether the vertex attribute is used when drawing this Mesh. Notes If a Mesh wasn't cr

Mesh:setAttributeEnabled

Mesh:setAttributeEnabled Available since LÖVE 0.10.0 This function is not supported in earlier versions. Enables or disables a specific vertex attribute in the Mesh. Vertex data from disabled attributes is not used when drawing the Mesh. Function Synopsis Mesh:setAttributeEnabled( name, enable ) Arguments string name The name of the vertex attribute to enable or disable. boolean enable Whether the vertex attribute is used when drawing this Mesh. Returns Nothing. Notes If a Mesh wasn't