Difference between revisions of "Mesh:setDrawRange"
m |
(Updated for 11.0) |
||
Line 3: | Line 3: | ||
== Function == | == Function == | ||
+ | {{newin|[[0.11.0]]|110|type=variant}} | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | Mesh:setDrawRange( | + | Mesh:setDrawRange( start, count ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|number| | + | {{param|number|start|The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh.}} |
− | {{param|number| | + | {{param|number|count|The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh.}} |
=== Returns === | === Returns === | ||
Nothing. | Nothing. | ||
Line 21: | Line 22: | ||
=== Arguments === | === Arguments === | ||
None. | None. | ||
+ | === Returns === | ||
+ | Nothing. | ||
+ | |||
+ | == Function == | ||
+ | {{oldin|[[0.11.0]]|110|type=variant}} | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | Mesh:setDrawRange( min, max ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|number|min|The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh.}} | ||
+ | {{param|number|max|The index of the last vertex to use when drawing, or the index of the last value in the vertex map to use if one is set for this Mesh.}} | ||
=== Returns === | === Returns === | ||
Nothing. | Nothing. | ||
Line 27: | Line 40: | ||
If a [[Mesh:setVertexMap|vertex map]] is used with the Mesh, this method will set a subset of the values in the vertex map array to use, instead of a subset of the total vertices in the Mesh. | If a [[Mesh:setVertexMap|vertex map]] is used with the Mesh, this method will set a subset of the values in the vertex map array to use, instead of a subset of the total vertices in the Mesh. | ||
− | For example, if <code>Mesh:setVertexMap(1, 2, 3, 1, 3, 4)</code> and <code>Mesh:setDrawRange(4, | + | For example, if <code>Mesh:setVertexMap(1, 2, 3, 1, 3, 4)</code> and <code>Mesh:setDrawRange(4, 2)</code> are called, vertices 1, 3, and 4 will be drawn. |
== See Also == | == See Also == |
Revision as of 17:43, 1 April 2018
Available since LÖVE 0.9.1 |
This function is not supported in earlier versions. |
Restricts the drawn vertices of the Mesh to a subset of the total.
Contents
Function
Available since LÖVE 0.11.0 |
This variant is not supported in earlier versions. |
Synopsis
Mesh:setDrawRange( start, count )
Arguments
number start
- The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh.
number count
- The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh.
Returns
Nothing.
Function
Allows all vertices in the Mesh to be drawn.
Synopsis
Mesh:setDrawRange( )
Arguments
None.
Returns
Nothing.
Function
Removed in LÖVE 0.11.0 |
This variant is not supported in that and later versions. |
Synopsis
Mesh:setDrawRange( min, max )
Arguments
number min
- The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh.
number max
- The index of the last vertex to use when drawing, or the index of the last value in the vertex map to use if one is set for this Mesh.
Returns
Nothing.
Notes
If a vertex map is used with the Mesh, this method will set a subset of the values in the vertex map array to use, instead of a subset of the total vertices in the Mesh.
For example, if Mesh:setVertexMap(1, 2, 3, 1, 3, 4)
and Mesh:setDrawRange(4, 2)
are called, vertices 1, 3, and 4 will be drawn.
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