Initializer

init(mtlDevice:)

Creates a Core Image context using the specified Metal device.

Declaration

init(mtlDevice device: MTLDevice)

Parameters

device

The Metal device object to use for rendering.

Return Value

A Core Image context.

Discussion

Use this method to choose a specific Metal device for rendering when a system contains multiple Metal devices. To create a Metal-based context using the system’s default Metal device, use the init(options:) method.

See Also

Creating a Context for GPU-Based Rendering with Metal

init(mtlDevice: MTLDevice, options: [CIContextOption : Any]?)

Creates a Core Image context using the specified Metal device and options.