Instance Method

initWithType:data:

Initializes a buffer containing the specified data.

Declaration

- (instancetype)initWithType:(MDLMeshBufferType)type data:(NSData *)data;

Parameters

type

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

- initWithType:length:

Initializes a buffer of the specified length.