Contents

init(bufferIndex:bufferOffset:bufferStride:stepFunction:stepRate:)

Creates a layout with the given buffer index, offset, stride, step function, and step rate.

Declaration

init(bufferIndex: Int, bufferOffset: Int = 0, bufferStride: Int, stepFunction: MTLVertexStepFunction = .perVertex, stepRate: Int = 1)

Parameters

  • bufferIndex:

    The index of the buffer this layout refers to.

  • bufferOffset:

    The byte offset into the buffer for the first byte of this layout. Defaults to 0.

  • bufferStride:

    The distance, in bytes, between consecutive vertices for attributes using this layout.

  • stepFunction:

    How the vertex shader steps through this layout’s data. Defaults to .perVertex.

  • stepRate:

    The number of instances that share the same per-instance data. Defaults to 1.