MTLNewLibraryCompletionHandler
A completion handler signature a method calls when it finishes creating a Metal library.
Declaration
typealias MTLNewLibraryCompletionHandler = ((any MTLLibrary)?, (any Error)?) -> VoidParameters
- library:
An Mtllibrary instance if the method successfully compiles the library without any errors; otherwise
nil. - error:
An error instance if the compiler generates any errors; otherwise
nil.
Discussion
The framework reports compiler warnings to the console. The error parameter doesn’t report warnings because it’s nil when there aren’t any compiler errors.