One Logo Pool Ball
MetalKit · IOS API REFERENCE

MTKTextureLoader

class · iOS 9.0+ · SDK 27.1

class MTKTextureLoader

Members (15)

init · iOS 9.0+

init

TypeScript
static init(device: SDKHandle): MTKTextureLoader
Swift declaration
init(device: any MTLDevice)
method · iOS 9.0+

newTexture

TypeScript
newTextureCgImageOptionsCompletionHandler(cgImage: _CoreGraphics_CGImage, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: (SDKHandle) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTexture(cgImage: CGImage, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTexture
method · iOS 9.0+

newTexture

TypeScript
newTextureCgImageOptions(cgImage: _CoreGraphics_CGImage, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): SDKHandle
Swift declaration
func newTexture(cgImage: CGImage, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
method · iOS 9.0+

newTexture

TypeScript
newTextureURLOptionsCompletionHandler(URL: string, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: (SDKHandle) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTexture
method · iOS 9.0+

newTexture

TypeScript
newTextureURLOptions(URL: string, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): SDKHandle
Swift declaration
func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
method · iOS 9.0+

newTexture

TypeScript
newTextureDataOptionsCompletionHandler(data: ArrayBuffer, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: (SDKHandle) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTexture(data: Data, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTexture
method · iOS 9.0+

newTexture

TypeScript
newTextureDataOptions(data: ArrayBuffer, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): SDKHandle
Swift declaration
func newTexture(data: Data, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
method · iOS 10.0+

newTexture

TypeScript
newTextureTextureOptionsCompletionHandler(texture: _ModelIO_MDLTexture, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: (SDKHandle) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTexture
method · iOS 10.0+

newTexture

TypeScript
newTextureTextureOptions(texture: _ModelIO_MDLTexture, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): SDKHandle
Swift declaration
func newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
method · iOS 10.0+

newTexture

TypeScript
newTextureNameScaleFactorBundleOptionsCompletionHandler(name: string, scaleFactor: number, bundle: (_Foundation_Bundle) | null, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: (SDKHandle) | null, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTexture(name: String, scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> any MTLTexture
method · iOS 10.0+

newTexture

TypeScript
newTextureNameScaleFactorBundleOptions(name: string, scaleFactor: number, bundle?: (_Foundation_Bundle) | null, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): SDKHandle
Swift declaration
func newTexture(name: String, scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
method · iOS 10.0+

newTextures

TypeScript
newTexturesURLsOptionsCompletionHandler(URLs: Array<string>, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: Array<SDKHandle>, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [any MTLTexture]
method · iOS 10.0+

newTextures

TypeScript
newTexturesURLsOptionsError(URLs: Array<string>, options?: (NativeMap<MTKTextureLoader_Option, unknown>) | null): { $ret: Array<SDKHandle>; $out: { "error": (_Foundation_NSError) | null } }
Swift declaration
func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil, error: NSErrorPointer) -> [any MTLTexture]

Omit the output parameters from the call. The result contains $ret and $out, with error inside $out.

method · iOS 10.0+

newTextures

TypeScript
newTexturesNamesScaleFactorBundleOptionsCompletionHandler(names: Array<string>, scaleFactor: number, bundle: (_Foundation_Bundle) | null, options: (NativeMap<MTKTextureLoader_Option, unknown>) | null, completionHandler: ((arg0: Array<SDKHandle>, arg1: (NativeError) | null) => void)): void
Swift declaration
func newTextures(names: [String], scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [any MTLTexture]
get · iOS 9.0+

device

TypeScript
get device(): SDKHandle
Swift declaration
var device: any MTLDevice { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MTKTextureLoader.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All MetalKit types →