Apple releases C++ wrapper for Metal.
Metal-cpp is a low-overhead C++ interface for Metal that helps developers add Metal functionality to graphics apps, games, and game engines that are written in C++.Apple Developer
- Drop in C++ alternative interface to the Metal Objective-C headers.
- Direct mapping of all Metal Objective-C classes, constants and enums to C++ in the MTL C++ namespace.
- No measurable overhead compared to calling Metal Objective-C headers, due to inlining of C++ function calls.
- No usage of wrapper containers that require additional allocations.
- Identical header files and function/constant/enum availability for iOS, iPadOS, macOS and tvOS.
- Backwards compatibility: All
bool MTL::Device::supports...()functions check if their required selectors exist and automatically return
(ErrorDomain)constants are weak linked and automatically set to
nullptrif not available.
Apple’s article contains instructions on how to set up the project and get started with new interface.
Apple Developer: Getting started with Metal-cpp
Developer:Check new C++ interface for Metal.
QA engineer:Business as usual.
PM/DM:Business as usual.