MetalKit iOS 10.3 to 11.0 API Differences

MTKModel.h
Declaration
FromNSString *const _Nonnull MTKModelErrorDomain
ToMTKModelError _Nonnull const MTKModelErrorDomain

Declaration
FromNSString *const _Nonnull MTKModelErrorKey
ToMTKModelError _Nonnull const MTKModelErrorKey

Declaration
FromMTLVertexDescriptor * _Nonnull MTKMetalVertexDescriptorFromModelIO(MDLVertexDescriptor * _Nonnull modelIODescriptor)
ToMTLVertexDescriptor * _Nullable MTKMetalVertexDescriptorFromModelIO(MDLVertexDescriptor * _Nonnull modelIODescriptor)

Declaration
FromMTLVertexDescriptor * _Nonnull MTKMetalVertexDescriptorFromModelIOWithError(MDLVertexDescriptor * _Nonnull modelIODescriptor, NSError * _Nullable * _Nullable error)
ToMTLVertexDescriptor * _Nullable MTKMetalVertexDescriptorFromModelIOWithError(MDLVertexDescriptor * _Nonnull modelIODescriptor, NSError * _Nullable * _Nullable error)

MTKTextureLoader.h
Declaration
FromNSString *const _Nonnull MTKTextureLoaderErrorDomain
ToMTKTextureLoaderError _Nonnull const MTKTextureLoaderErrorDomain

Declaration
FromNSString *const _Nonnull MTKTextureLoaderErrorKey
ToMTKTextureLoaderError _Nonnull const MTKTextureLoaderErrorKey

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionAllocateMipmaps
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionAllocateMipmaps

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionGenerateMipmaps
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionGenerateMipmaps

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionSRGB
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionSRGB

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionTextureUsage
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionTextureUsage

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionTextureCPUCacheMode
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionTextureCPUCacheMode

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionTextureStorageMode
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionTextureStorageMode

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionCubeLayout
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionCubeLayout

Declaration
FromNSString *const _Nonnull MTKTextureLoaderCubeLayoutVertical
ToMTKTextureLoaderCubeLayout _Nonnull const MTKTextureLoaderCubeLayoutVertical

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOptionOrigin
ToMTKTextureLoaderOption _Nonnull const MTKTextureLoaderOptionOrigin

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOriginTopLeft
ToMTKTextureLoaderOrigin _Nonnull const MTKTextureLoaderOriginTopLeft

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOriginBottomLeft
ToMTKTextureLoaderOrigin _Nonnull const MTKTextureLoaderOriginBottomLeft

Declaration
FromNSString *const _Nonnull MTKTextureLoaderOriginFlippedVertically
ToMTKTextureLoaderOrigin _Nonnull const MTKTextureLoaderOriginFlippedVertically

Declaration
From- (void)newTextureWithContentsOfURL:(nonnull NSURL *)URL options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler
To- (void)newTextureWithContentsOfURL:(nonnull NSURL *)URL options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler

Declaration
From- (void)newTextureWithName:(nonnull NSString *)name scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler
To- (void)newTextureWithName:(nonnull NSString *)name scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler

Declaration
From- (void)newTexturesWithContentsOfURLs:(nonnull NSArray<NSURL *> *)URLs options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderArrayCallback)completionHandler
To- (void)newTexturesWithContentsOfURLs:(nonnull NSArray<NSURL *> *)URLs options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderArrayCallback)completionHandler

Declaration
From- (void)newTexturesWithNames:(nonnull NSArray<NSString *> *)names scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderArrayCallback)completionHandler
To- (void)newTexturesWithNames:(nonnull NSArray<NSString *> *)names scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderArrayCallback)completionHandler

Declaration
From- (void)newTextureWithData:(nonnull NSData *)data options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler
To- (void)newTextureWithData:(nonnull NSData *)data options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler

Declaration
From- (void)newTextureWithCGImage:(nonnull CGImageRef)cgImage options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler
To- (void)newTextureWithCGImage:(nonnull CGImageRef)cgImage options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler

Declaration
From- (void)newTextureWithMDLTexture:(nonnull MDLTexture *)texture options:(nullable NSDictionary<NSString *,NSObject *> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler
To- (void)newTextureWithMDLTexture:(nonnull MDLTexture *)texture options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options completionHandler:(nonnull MTKTextureLoaderCallback)completionHandler

Declaration
From- (nullable id<MTLTexture>)newTextureWithContentsOfURL:(nonnull NSURL *)URL options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nullable id<MTLTexture>)newTextureWithContentsOfURL:(nonnull NSURL *)URL options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error

Declaration
From- (nonnull NSArray<id<MTLTexture>> *)newTexturesWithContentsOfURLs:(nonnull NSArray<NSURL *> *)URLs options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nonnull NSArray<id<MTLTexture>> *)newTexturesWithContentsOfURLs:(nonnull NSArray<NSURL *> *)URLs options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error

Declaration
From- (nullable id<MTLTexture>)newTextureWithData:(nonnull NSData *)data options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nullable id<MTLTexture>)newTextureWithData:(nonnull NSData *)data options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error

Declaration
From- (nullable id<MTLTexture>)newTextureWithCGImage:(nonnull CGImageRef)cgImage options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nullable id<MTLTexture>)newTextureWithCGImage:(nonnull CGImageRef)cgImage options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error

Declaration
From- (nullable id<MTLTexture>)newTextureWithMDLTexture:(nonnull MDLTexture *)texture options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nullable id<MTLTexture>)newTextureWithMDLTexture:(nonnull MDLTexture *)texture options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error

Declaration
From- (nullable id<MTLTexture>)newTextureWithName:(nonnull NSString *)name scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<NSString *,NSObject *> *)options error:(nullable NSError * _Nullable *)error
To- (nullable id<MTLTexture>)newTextureWithName:(nonnull NSString *)name scaleFactor:(CGFloat)scaleFactor bundle:(nullable NSBundle *)bundle options:(nullable NSDictionary<MTKTextureLoaderOption,id> *)options error:(nullable NSError * _Nullable *)error