setFragmentBuffers(_:offsets:range:)
Assigns multiple buffers to a range of entries in the fragment shader argument table.
Declaration
func setFragmentBuffers(_ buffers: [(any MTLBuffer)?], offsets: [Int], range: Range<Int>)Parameters
- buffers:
An array of Mtlbuffer instances the command assigns to entries in the fragment shader argument table for buffers.
- offsets:
An array of integers. Each element represents the location, in bytes, from the start of the corresponding Mtlbuffer element in
bufferswhere the fragment shader argument data begins.See the Metal Feature Set Tables to check for offset alignment requirements for buffers in
deviceandconstantaddress space. - range:
A span of integers that represent the entries in the fragment shader argument table for buffers. Each entry stores a record of the corresponding element in
buffersandoffsets.
Discussion
By default, the buffer at each index is nil.