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 -> LowLevelMeshInstanceParameters
- 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
nilif none. - surfaceArguments:
The argument table bound to the surface shader stage, or
nilif none. - lightingArguments:
The argument table bound to the lighting function stage, or
nilif 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.