Contents

makeLibrary(filepath:)

Creates a Metal library instance that contains the functions in the Metal library file at a file path.

Declaration

func makeLibrary(filepath: String) throws -> any MTLLibrary

Parameters

  • filepath:

    A string of the absolute file path to a Metal library file (ending in .metallib).

Return Value

A new MTLLibrary instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.

See Also

Creating shader libraries