Metal (API)

Metal
Developer(s)Apple Inc.
Initial releaseJune 2014; 10 years ago (2014-06)
Stable release
24 / October 2022; 2 years ago (2022-10)
Written inShading language: C++14, Runtime/API: Objective-C
Operating systemiOS, iPadOS, macOS, tvOS
Type3D graphics and compute API
LicenseProprietary
Websitedeveloper.apple.com/metal/

Metal is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API created by Apple, debuting in iOS 8. Metal combines functions similar to OpenGL and OpenCL in one API. It is intended to improve performance by offering low-level access to the GPU hardware for apps on iOS, iPadOS, macOS, and tvOS. It can be compared to low-level APIs on other platforms such as Vulkan and DirectX 12.

Metal is an object-oriented API that can be invoked using the Swift, Objective-C or C++17[2] programming languages. Full-blown GPU execution is controlled via the Metal Shading Language. According to Apple promotional materials: "MSL [Metal Shading Language] is a single, unified language that allows tighter integration between the graphics and compute programs. Since MSL is C++-based, you will find it familiar and easy to use."[3]

  1. ^ Cite error: The named reference Polygon: iPhone 6 was invoked but never defined (see the help page).
  2. ^ "Getting started with Metal-CPP - Metal".
  3. ^ Apple Inc. "Metal Shading Language Specification" (PDF).