Contents

makeMeshInstance(meshPart:pipeline:geometryArguments:surfaceArguments:lightingArguments:transform:sortCategory:)

Creates a drawable mesh instance pairing a mesh part with a compiled pipeline state and optional per-draw argument tables.

Declaration

func makeMeshInstance(meshPart: LowLevelMeshPart, pipeline: LowLevelRenderPipelineState, geometryArguments: LowLevelArgumentTable?, surfaceArguments: LowLevelArgumentTable?, lightingArguments: LowLevelArgumentTable?, transform: simd_float4x4, sortCategory: LowLevelMeshInstance.SortCategory) throws -> LowLevelMeshInstance

Parameters

  • meshPart:

    The mesh part this instance draws.

  • pipeline:

    The compiled pipeline state used to render this instance.

  • geometryArguments:

    The argument table bound to the geometry modifier stage, or nil if none.

  • surfaceArguments:

    The argument table bound to the surface shader stage, or nil if none.

  • lightingArguments:

    The argument table bound to the lighting function stage, or nil if none.

  • transform:

    The initial model-to-world transform of this instance.

  • sortCategory:

    The category (opaque or transparent) for sorting.

Return Value

A newly created LowLevelMeshInstance.

Discussion

Pass nil for any argument table stage not required by the material.

See Also

Creating meshes