Difference between revisions of "Mesh:getVertexAttribute"

m (Synopsis)
m (Synopsis: oops)
Line 6: Line 6:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
value1, value2, ... = Mesh:setVertexAttribute( vertexindex, attributeindex )
+
value1, value2, ... = Mesh:getVertexAttribute( vertexindex, attributeindex )
 
</source>
 
</source>
  

Revision as of 02:20, 5 December 2015

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 vertexindex
The index of the the vertex to be modified.
number attributeindex
The index of the attribute within the vertex to be modified.

Returns

number value1
The value of the first component of the attribute.
number value2
The value of the second component of the attribute.
number ...
Any additional vertex attribute components.

See Also

Other Languages