Type Alias

MTLNewLibraryCompletionHandler

A block of code that is invoked when a MTLLibrary object has completed loading.

Declaration

typealias MTLNewLibraryCompletionHandler = (MTLLibrary?, Error?) -> Void

Discussion

The completion handler takes the following parameters:

library

A new library object that contains the compiled source code or nil if an error occurred.

error

An error object that describes source code compilation problems, if any. This object contains compiler errors if the returned library object is nil, and compiler warnings if the library was generated with warnings. If the library was generated successfully, without errors or warnings, this error object is nil.