Sets a block of data for the vertex shader.
- iOS 8.3+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
The memory address from which to copy the data.
The number of bytes to copy.
The index in the buffer argument table.
Using this method is equivalent to creating a new
MTLBuffer object from the specified data and then binding it to the vertex shader, with the
set method. However, this method avoids the overhead of creating a buffer to store your data; instead, Metal manages the data.
Use this method for single-use data smaller than 4 KB. Create a
MTLBuffer object if your data exceeds 4 KB in length or persists for multiple uses.