Difference between revisions of "MeshDrawMode"
m (moved GeometryDrawMode to MeshDrawMode: Geometry is out, Mesh is in) |
(GeometryDrawMode -> MeshDrawMode) |
||
Line 1: | Line 1: | ||
{{newin|[[0.9.0]]|090|type=enum}} | {{newin|[[0.9.0]]|090|type=enum}} | ||
− | How a [[ | + | How a [[Mesh]]'s vertices are used when drawing. |
== Constants == | == Constants == | ||
− | ;fan: The | + | ;fan: The vertices create a "fan" shape with the first vertex acting as the hub point. Can be easily used to draw simple convex polygons. |
− | ;strip: The | + | ;strip: The vertices create a series of connected triangles using vertices v1, v2, v3, then v3, v2, v4 (note the order), then v3, v4, v5 and so on. |
− | ;triangles: The | + | ;triangles: The vertices create unconnected triangles. |
+ | ;points: The vertices are drawn as unconnected points (see [[love.graphics.setPointSize]].) | ||
== Notes == | == Notes == | ||
− | If the | + | If the Mesh has a custom [[Mesh:setVertexMap|vertex map]], then that will determine the order in which the vertices are interpreted by the draw mode. |
− | The vertex map can also be used to make the draw mode reuse vertices, for example if the | + | The vertex map can also be used to make the draw mode reuse vertices, for example if the Mesh has 4 vertices and is using the "triangles" draw mode, the vertex map could be set to {1, 2, 3, 1, 3, 4} to draw 2 triangles using only 4 vertices, effectively drawing a quad using triangles. |
[[File:geometry_modes.png]] | [[File:geometry_modes.png]] | ||
Line 16: | Line 17: | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
− | * [[love.graphics. | + | * [[love.graphics.newMesh]] |
− | * [[parent:: | + | * [[parent::Mesh]] |
[[Category:Enums]] | [[Category:Enums]] | ||
− | {{#set:Description=How a | + | {{#set:Description=How a Mesh's vertices are used when drawing.}} |
== Other Languages == | == Other Languages == | ||
− | {{i18n| | + | {{i18n|MeshDrawMode}} |
Revision as of 16:17, 8 October 2013
Available since LÖVE 0.9.0 |
This enum is not supported in earlier versions. |
How a Mesh's vertices are used when drawing.
Contents
Constants
- fan
- The vertices create a "fan" shape with the first vertex acting as the hub point. Can be easily used to draw simple convex polygons.
- strip
- The vertices create a series of connected triangles using vertices v1, v2, v3, then v3, v2, v4 (note the order), then v3, v4, v5 and so on.
- triangles
- The vertices create unconnected triangles.
- points
- The vertices are drawn as unconnected points (see love.graphics.setPointSize.)
Notes
If the Mesh has a custom vertex map, then that will determine the order in which the vertices are interpreted by the draw mode.
The vertex map can also be used to make the draw mode reuse vertices, for example if the Mesh has 4 vertices and is using the "triangles" draw mode, the vertex map could be set to {1, 2, 3, 1, 3, 4} to draw 2 triangles using only 4 vertices, effectively drawing a quad using triangles.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info