setFragmentBuffer(_:offset:index:)
Assigns a buffer to an entry in the fragment shader argument table.
Declaration
func setFragmentBuffer(_ buffer: (any MTLBuffer)?, offset: Int, index: Int)Parameters
- buffer:
An Mtlbuffer instance the command assigns to an entry in the fragment shader argument table for buffers.
- offset:
An integer that represents the location, in bytes, from the start of
bufferwhere the fragment shader argument data begins.See the Metal Feature Set Tables to check for offset alignment requirements for buffers in
deviceandconstantaddress space. - index:
An integer that represents the entry in the fragment shader argument table for buffers that stores a record of
bufferandoffset.
Mentioned in
Discussion
By default, the buffer at each index is nil.