Instance Method

setBuffer(_:offset:index:)

Encodes a reference to a buffer into the argument buffer.

Required.

Declaration

func setBuffer(_ buffer: MTLBuffer?, offset: Int, index: Int)

Parameters

buffer

The buffer to encode.

offset

The byte offset of the buffer.

index

The index of the buffer within the argument buffer. This value corresponds to either the index ID of a Metal shading language declaration or the index field of a MTLArgumentDescriptor object.

See Also

Encoding Buffers

func setBuffers([MTLBuffer?], offsets: [Int], range: Range<Int>)

Encodes references to an array of buffers into the argument buffer.

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