setTessellationFactorBuffer(_:offset:instanceStride:)
Configures the per-patch tessellation factors for any subsequent patch-drawing commands.
Declaration
func setTessellationFactorBuffer(_ buffer: (any MTLBuffer)?, offset: Int, instanceStride: Int)Parameters
- buffer:
An Mtlbuffer instance that stores the per-patch tessellation factors, which can’t be empty or
nil. - offset:
The distance, in bytes, between the start of the data and the start of the buffer, which needs to be a multiple of
4. - instanceStride:
The number of bytes between two instances of data in
buffer, which needs to be a multiple of4.
Discussion
Call this method before encoding patch-drawing commands.