Contents

addOrReplaceAttribute(_:)

Adds the specified vertex attribute to the vertex descriptor, replacing any existing attribute with the same name.

Declaration

func addOrReplaceAttribute(_ attribute: MDLVertexAttribute)

Parameters

  • attribute:

    The vertex attribute to add to the vertex descriptor.

Discussion

If the vertex descriptor contains an attribute whose name property is the same as that of the attribute parameter, the new attribute replaces the existing attribute in the attributes array. Otherwise, this method adds the new attribute to the end of the attributes array.

See Also

Working with Vertex Attributes