Function

CGDirectDisplayCopyCurrentMetalDevice

Returns a reference to the Metal device currently driving a given display.

Declaration

id<MTLDevice> CGDirectDisplayCopyCurrentMetalDevice(CGDirectDisplayID display);

Parameters

display

A unique identifier for a given display.

Return Value

A device that supports Metal framework commands.

Discussion

See Also

Acquiring Device Objects

MTLCreateSystemDefaultDevice

Returns a reference to the preferred default Metal device object.

MTLCopyAllDevices

Returns an array of references to all Metal device objects in the system.

MTLCopyAllDevicesWithObserver

Fetches the available Metal devices and registers a notification observer for changes to the list.

MTLRemoveDeviceObserver

Removes a registered observer of device notifications.