Structure

MTLDrawPatchIndirectArguments

The data layout required for drawing patches via indirect buffer calls.

Topics

Initializers

init()

Returns a new data layout for drawing patches via indirect buffer calls.

init(patchCount: UInt32, instanceCount: UInt32, patchStart: UInt32, baseInstance: UInt32)

Returns a new data layout for drawing patches via indirect buffer calls, with specified parameters.

Instance Properties

var baseInstance: UInt32

The first instance to draw.

var instanceCount: UInt32

The number of instances to draw.

var patchCount: UInt32

The number of patches in each instance.

var patchStart: UInt32

The patch start index.

See Also

Drawing Geometric Primitives and Tessellated Patches Indirectly

Specifying Drawing and Dispatch Arguments Indirectly

Use indirect commands if you don't know your draw or dispatch call arguments when you encode the command.

func drawPrimitives(type: MTLPrimitiveType, indirectBuffer: MTLBuffer, indirectBufferOffset: Int)

Encodes a command to render a number of instances of primitives using vertex data in contiguous array elements, starting from a base instance.

Required.

func drawIndexedPrimitives(type: MTLPrimitiveType, indexType: MTLIndexType, indexBuffer: MTLBuffer, indexBufferOffset: Int, indirectBuffer: MTLBuffer, indirectBufferOffset: Int)

Encodes a command to render a number of instances of primitives using index data in contiguous array elements, starting from the base vertex of a base instance.

Required.

func drawPatches(numberOfPatchControlPoints: Int, patchIndexBuffer: MTLBuffer?, patchIndexBufferOffset: Int, indirectBuffer: MTLBuffer, indirectBufferOffset: Int)

Encodes a command to render a number of instances of tessellated patches, using an indirect buffer.

Required.

struct MTLDrawIndexedPrimitivesIndirectArguments

The data layout required for drawing indexed primitives via indirect buffer calls.

struct MTLDrawPrimitivesIndirectArguments

The data layout required for drawing primitives via indirect buffer calls.