Contents

makeLibrary(URL:)

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

Declaration

func makeLibrary(URL url: URL) throws -> any MTLLibrary

Parameters

  • url:

    A URL to a Metal library file (ending in .metallib).

Mentioned in

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