Mesh:setAttributeEnabled

Mesh:setAttributeEnabled

Available since LÖVE 0.10.0
This function is not supported in earlier versions.

Enables or disables a specific vertex attribute in the Mesh. Vertex data from disabled attributes is not used when drawing the Mesh.

Function

Synopsis

Mesh:setAttributeEnabled( name, enable )

Arguments

string name
The name of the vertex attribute to enable or disable.
boolean enable
Whether the vertex attribute is used when drawing this Mesh.

Returns

Nothing.

Notes

If a Mesh wasn't created with a custom vertex format, it will have 3 vertex attributes named VertexPosition, VertexTexCoord, and VertexColor. Otherwise the attribute name must either match one of the vertex attributes specified in the vertex format when creating the Mesh, or must match a vertex attribute from another Mesh attached to this Mesh via Mesh:attachAttribute.

See Also

doc_love
2017-03-21 15:51:10
Comments
Leave a Comment

Please login to continue.