Difference between revisions of "Mesh:setDrawRange"

m
m
Line 32: Line 32:
 
* [[parent::Mesh]]
 
* [[parent::Mesh]]
 
* [[Mesh:getDrawRange]]
 
* [[Mesh:getDrawRange]]
 +
* [[love.graphics.draw]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Restricts the drawn vertices of the Mesh to a subset of the total.}}
 
{{#set:Description=Restricts the drawn vertices of the Mesh to a subset of the total.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Mesh:setDrawRange}}
 
{{i18n|Mesh:setDrawRange}}

Revision as of 23:37, 7 April 2015

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.

Function

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.

Function

Allows all vertices in the Mesh to be drawn.

Synopsis

Mesh:setDrawRange( )

Arguments

None.

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, 6) are called, vertices 1, 3, and 4 will be drawn.

See Also

Other Languages