Type Method

contextWithMTLDevice:

Creates a Core Image context using the specified Metal device.

Declaration

+ (CIContext *)contextWithMTLDevice:(id<MTLDevice>)device;

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 initWithOptions: method.

See Also

Creating a Context for GPU-Based Rendering with Metal

+ contextWithMTLDevice:options:

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software