Contents

init(named:in:constantValues:uniformsType:)

Creates a descriptor for a geometry modifier that accepts a custom uniforms argument buffer, deriving the buffer size from uniformsType.

Declaration

init<UniformsType>(named name: String, in library: any MTLLibrary, constantValues: MTLFunctionConstantValues = .init(), uniformsType: UniformsType.Type)

Parameters

  • name:

    The name of the Metal function in the library.

  • library:

    The Metal library that contains the function.

  • constantValues:

    The Metal function constant values to specialize the function with.

  • uniformsType:

    The Swift type that mirrors your Metal uniforms struct.

Discussion

Equivalent to calling init(named:in:constantValues:uniformsSize:) with MemoryLayout<UniformsType>.size.

See Also

Creating a descriptor