Contents

init(type:data:)

Initializes a buffer containing the specified data.

Declaration

init(type: MDLMeshBufferType, data: Data?)

Parameters

  • type:

    Vertex to create a buffer for a mesh’s vertex attribute data, or Index to create a buffer for a submesh’s index data.

  • data:

    The initial data to copy into the buffer.

Return Value

A new memory buffer for mesh data.

See Also

Creating a Buffer