Structure

MTLDrawIndexedPrimitivesIndirectArguments

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

Declaration

struct MTLDrawIndexedPrimitivesIndirectArguments

Overview

Topics

Initializers

init()

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

init(indexCount: UInt32, instanceCount: UInt32, indexStart: UInt32, baseVertex: Int32, baseInstance: UInt32)

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

Instance Properties

var baseInstance: UInt32

The first instance to draw.

var baseVertex: Int32

The first vertex to draw.

var indexCount: UInt32

For each instance, the number of indices to read from the index buffer.

var indexStart: UInt32

The first index to draw.

var instanceCount: UInt32

The number of instances to draw.

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 MTLDrawPrimitivesIndirectArguments

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

struct MTLDrawPatchIndirectArguments

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