makeBuffer(length:options:)
Creates a buffer the method clears with zero values.
Declaration
func makeBuffer(length: Int, options: MTLResourceOptions = []) -> (any MTLBuffer)?Parameters
- length:
The size of the new buffer, in bytes.
- options:
An Mtlresourceoptions instance that sets the buffer’s storage and hazard-tracking modes. See Resource Fundamentals and Setting Resource Storage Modes for more information.
Mentioned in
Return Value
A new MTLBuffer instance if the method completed successfully; otherwise nil.