Instance Method

newDefaultLibraryWithBundle:error:

Creates a library object containing the functions stored in the default Metal library in the specified bundle.

Required.

Declaration

- (id<MTLLibrary>)newDefaultLibraryWithBundle:(NSBundle *)bundle error:(NSError * _Nullable *)error;

Parameters

bundle

The bundle to search.

error

An error object that describes the problem, or nil if the operation succeeded.

Return Value

A new library object that contains the functions from the default library. This method returns nil if the default library cannot be found.

See Also

Creating Shader Libraries

- newDefaultLibrary

Creates a library object containing the functions in the app’s default Metal library.

Required.

- newLibraryWithFile:error:

Creates a library object containing the functions in a Metal library file at a specified path.

Required.

- newLibraryWithURL:error:

Creates a library object containing the functions in a Metal library file at a specified URL.

Required.

- newLibraryWithData:error:

Creates a library object containing the functions stored in a binary data object created from a precompiled Metal library.

Required.

- newLibraryWithSource:options:completionHandler:

Creates a library object asynchronously by compiling the functions stored in the specified source string.

Required.

- newLibraryWithSource:options:error:

Creates a library object synchronously by compiling the functions stored in the specified source string.

Required.