Initializer

init(type:data:)

Initializes a buffer containing the specified data.

Declaration

init(type: MDLMeshBufferType, data: Data?)

Parameters

type

MDLMeshBufferType.vertex to create a buffer for a mesh’s vertex attribute data, or MDLMeshBufferType.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

init(type: MDLMeshBufferType, length: Int)

Initializes a buffer of the specified length.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software