Difference between revisions of "Mesh"

m
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=type}}
 
{{newin|[[0.9.0]]|090|type=type}}
 
+
A [http://en.wikipedia.org/wiki/Polygon_mesh polygon mesh] used for drawing arbitrary textured shapes.
A 2D [http://en.wikipedia.org/wiki/Polygon_mesh polygon mesh] used for drawing arbitrary textured shapes.
 
 
 
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Mesh]]  
+
{{#ask: [[Category:Functions]] [[Constructs::Mesh]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 16: Line 14:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Mesh||Object]]  
+
{{#ask: [[Category:Functions]] [[parent::Mesh||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| format=template
 
| format=template
Line 27: Line 25:
 
}}
 
}}
 
== Enums ==
 
== Enums ==
{{#ask: [[Category:Enums]] [[parent::Mesh||Object]]
+
{{#ask: [[Category:Enums]] [[parent::Mesh||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| format=template
 
| format=template
Line 40: Line 38:
 
* [[parent::Drawable]]
 
* [[parent::Drawable]]
 
* [[parent::Object]]
 
* [[parent::Object]]
 
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
* [[love.graphics.draw]]
 
* [[love.graphics.draw]]
 
+
* [[SpriteBatch:attachAttribute]]
 
[[Category:Types]]
 
[[Category:Types]]
 
{{#set:Description=A 2D polygon mesh used for drawing arbitrary textured shapes.}}
 
{{#set:Description=A 2D polygon mesh used for drawing arbitrary textured shapes.}}
 +
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Mesh}}
 
{{i18n|Mesh}}

Latest revision as of 01:02, 3 April 2022

Available since LÖVE 0.9.0
This type is not supported in earlier versions.

A polygon mesh used for drawing arbitrary textured shapes.

Constructors

love.graphics.newMesh Creates a new Mesh. Added since 0.9.0

Functions

Mesh:attachAttribute Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. Optionally allows per-instance attributes. Added since 0.10.0
Mesh:detachAttribute Removes a previously attached vertex attribute from this Mesh. Added since 11.0
Mesh:flush Immediately sends all modified vertex data in the Mesh to the graphics card. Added since 0.10.0
Mesh:getDrawMode Gets the mode used when drawing the Mesh. Added since 0.9.0
Mesh:getDrawRange Gets the range of vertices used when drawing the Mesh. Added since 0.9.1
Mesh:getImage Gets the Image used when drawing the Mesh. Added since 0.9.0 Removed in 0.10.0
Mesh:getTexture Gets the texture (Image or Canvas) used when drawing the Mesh. Added since 0.9.1
Mesh:getVertex Gets the properties of a vertex in the Mesh. Added since 0.9.0
Mesh:getVertexAttribute Gets the properties of a specific attribute within a vertex in the Mesh. Added since 0.10.0
Mesh:getVertexCount Gets the total number of vertices in the Mesh. Added since 0.9.0
Mesh:getVertexFormat Gets the vertex format that the Mesh was created with. Added since 0.10.0
Mesh:getVertexMap Gets the vertex map for the Mesh. Added since 0.9.0
Mesh:getVertices Gets all the vertices in the Mesh. Added since 0.9.0 Removed in 0.10.0
Mesh:hasVertexColors Gets whether per-vertex colors are used when drawing the Mesh. Added since 0.9.0 Removed in 0.10.0
Mesh:isAttributeEnabled Gets whether a specific vertex attribute in the Mesh is enabled. Added since 0.10.0
Mesh:setAttributeEnabled Enables or disables a specific vertex attribute in the Mesh. Added since 0.10.0
Mesh:setDrawMode Sets the mode used when drawing the Mesh. Added since 0.9.0
Mesh:setDrawRange Restricts the drawn vertices of the Mesh to a subset of the total. Added since 0.9.1
Mesh:setImage Sets the Image used when drawing the Mesh. Added since 0.9.0 Removed in 0.10.0
Mesh:setTexture Sets the texture (Image or Canvas) used when drawing the Mesh. Added since 0.9.1
Mesh:setVertex Sets the properties of a vertex in the Mesh. Added since 0.9.0
Mesh:setVertexAttribute Sets the properties of a specific attribute within a vertex in the Mesh. Added since 0.10.0
Mesh:setVertexColors Sets whether per-vertex colors are used instead of the constant color when drawing the Mesh. Added since 0.9.0 Removed in 0.10.0
Mesh:setVertexMap Sets the vertex map for the Mesh. Added since 0.9.0
Mesh:setVertices Replaces a range of vertices in the Mesh with new ones. Added since 0.9.0
Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.

Enums

AttributeDataType Data types used in a Mesh's vertex format. Added since 0.9.0
BufferDataUsage Usage hints for SpriteBatches, Meshes, and GraphicsBuffers to optimize data storage and access. Added since 0.8.0
IndexDataType Vertex map datatype. Added since 11.0
MeshDrawMode How a Mesh's vertices are used when drawing. Added since 0.9.0
VertexAttributeStep The frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn. Added since 11.0

Supertypes

See Also


Other Languages