Contents

setVertexBuffers(_:offsets:range:)

Assigns multiple buffers to a range of entries in the vertex shader argument table.

Declaration

func setVertexBuffers(_ buffers: [(any MTLBuffer)?], offsets: [Int], range: Range<Int>)

Parameters

  • buffers:

    An array of Mtlbuffer instances the command assigns to entries in the vertex 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 buffers where the vertex shader argument data begins.

    See the Metal Feature Set Tables to check for offset alignment requirements for buffers in device and constant address space.

  • range:

    A span of integers that represent the entries in the vertex shader argument table for buffers. Each entry stores a record of the corresponding element in buffers and offsets.

Discussion

By default, the buffer at each index is nil.

See Also

Assigning buffers