Instance Method

initWithType:length:

Initializes a buffer of the specified length.

Declaration

- (instancetype)initWithType:(MDLMeshBufferType)type length:(NSUInteger)length;

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.

length

The size, in bytes, of the buffer to create.

Return Value

A new memory buffer for mesh data.

Discussion

All bytes in the newly created buffer are zero.

See Also

Creating a Buffer

- initWithType:data:

Initializes a buffer containing the specified data.

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