Returns a reference to the Metal device currently driving a given display.
SDKs
- macOS 10.11+
- Mac Catalyst 13.0+
Framework
- Core Graphics
Declaration
id<MTLDevice> CGDirectDisplayCopyCurrentMetalDevice(CGDirect Display ID display);
Parameters
display
A unique identifier for a given display.
Return Value
A device that supports Metal framework commands.
Discussion
Note
When automatic graphics switching is enabled, the device returned can change at any time.