Instance Method

fill(_:offset:)

Writes the specified data into the buffer.

Required.

Declaration

func fill(_ data: Data, offset: Int)

Parameters

data

The data to be copied into the buffer.

offset

The offset, in bytes, from the start of the buffer at which to write data.

Discussion

If the length of the specified data (plus the offset parameter, if nonzero) is greater than the buffer’s length property, this method writes data only up to the end of the buffer.

See Also

Working with Data in a Buffer

func map() -> MDLMeshBufferMap

Provides direct, read-only access to the buffer’s contents.

Required.

var length: Int

The data size of the buffer, in bytes.

Required.

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