Creates a geometry source whose vertex data resides in the specified Metal buffer, allowing modification through a Metal compute shader.
Mac Catalyst 13.0+
A Metal buffer containing per-vertex data for the geometry source.
The type of per-vertex data in the buffer. A MTLVertexFormat value defines the number of components for each vector in the geometry source and the data type and size of each component.
The semantic value (or attribute) that the geometry source describes for each vertex. See Geometry Semantic Identifiers for available values.
The number of vertices in the geometry source.
The offset, in bytes, from the beginning of the data to the first vector component to be used in the geometry source.
The number of bytes from each vector to the next in the data.
A new geometry source object.
Use this method to create a geometry source whose underlying data can be modified at render time by a Metal compute shader running on the GPU. To create a MTLBuffer object for use with a geometry source, use the device property of the SceneKit view (or other renderer) responsible for drawing your scene.
Then, to modify the buffer’s contents at render time, implement a scene renderer delegate and schedule a compute command encoder during a render delegate method such as renderer(_:willRenderScene:atTime:).