WineMetalGL
OpenGL, rebuilt on Metal.
A replacement for Apple's deprecated OpenGL framework. Native Arm64 apps and Wine programs get OpenGL 1.0 through 4.6 and OpenGL ES 2.0 through 3.2, conformant with the Khronos GL-CTS, drawn with Metal. MetalSharp 1.0.0 uses it on both builds.
- OpenGL / WGL
- winemetalgl.dll
- libwinemetalgl
- GLSL → SPIR-V → MSL
- Metal
OpenGL without Apple's OpenGL.
Apple deprecated its OpenGL framework in 2018, and it stops at OpenGL 4.1. WineMetalGL replaces it. Native Arm64 applications and Wine programs get OpenGL 1.0 through 4.6, core and compatibility profiles, and OpenGL ES 2.0 through 3.2, all drawn with Metal.
The core, libwinemetalgl.dylib, has no dependency on Apple's OpenGL. It compiles GLSL with glslang and SPIRV-Cross to the Metal Shading Language, and implements the GL state machine, resources, and draws on Metal. The Wine module (winemetalgl.dll and winemetalgl.so, with a forwarding opengl32.dll in the prefix) carries WGL and every GL call to the core. Wine itself is not patched or rebuilt.
- OpenGL 4.6Core and compatibility contexts, which Apple's OpenGL can't provide.
- GLES 3.2OpenGL ES 2.0 through 3.2.
- Khronos CTSConformant with the GL-CTS test suite.
- x86_64 + arm64x86_64 Wine and CrossOver, and, since 3.7.0, native arm64 Wine.
On both builds.
x86_64 build
The runtime bundle carries WineMetalGL 3.7.0's core next to Wine's Mac driver, which loads it. Games get OpenGL 4.6 core and compatibility contexts on Metal; DOOM (2016) runs its OpenGL renderer on it.
WINEMETALGL=0 goes back to Apple's OpenGL.
Arm64 FEX build
WineMetalGL is the default OpenGL in MetalSharp Wine, so prefixes need no setup. It also backs the OpenGL lane, where Wine's own Direct3D runs over WineMetalGL.
OPENGL_BACKEND=wine goes back to Wine's own OpenGL.
Measured against the Khronos CTS.
Every Khronos CTS run per OpenGL version. 4.4 and 4.5 are covered by the KHR-GL46 run.
| OpenGL | Conformance | Unsupported |
|---|---|---|
| 3.0 | 99.88% | 2.28% |
| 3.1 | 100% | 2.38% |
| 3.2 | 100% | 0.69% |
| 3.3 | 100% | 1.11% |
| 4.0 | 99.99% | 10.11% |
| 4.1 | 99.99% | 10.08% |
| 4.2 | 99.98% | 9.74% |
| 4.3 | 99.97% | 15.60% |
| 4.4 – 4.5 | Covered by KHR-GL46 | |
| 4.6 | 99.98% | 22.33% |
| GLES | Conformance | Unsupported |
|---|---|---|
| 2.0 | 100% | 0.60% |
| 3.0 | 100% | 0.83% |
| 3.1 | 99.98% | 1.24% |
| 3.2 | 99.95% | 0.64% |
“Unsupported” counts the CTS cases that report NotSupported. Unsupported explains each gap, and Conformance results lists every run with the reason for each failing case.
Faster than Apple's OpenGL.
Where both run an entry, WineMetalGL's average frame time is 1.2 to 19.6 times shorter.
Frame times from WineMetalGL's game corpus, the median of three 600-frame runs with vsync off. Apple's OpenGL is the same program with WINEMETALGL=0.
| Entry | WineMetalGL avg | Apple's OpenGL avg | Faster by |
|---|---|---|---|
| scene33-core (GL 3.3 core) | 0.249 ms | 0.565 ms | 2.27× |
| scene33-core-30 | 0.251 ms | 0.554 ms | 2.21× |
| scene4x-core41 (GL 4.1 tessellation) | 2.038 ms | 39.889 ms | 19.57× |
| legacy-gl21 (fixed function) | 0.455 ms | 0.533 ms | 1.17× |
| legacy-gl21-i386 (32-bit) | 0.469 ms | 0.548 ms | 1.17× |
The GL 4.2 through 4.6 and compatibility-profile scenes run only on WineMetalGL: Apple's OpenGL can't create those contexts. See Performance and the game corpus.
Install it anywhere.
WineMetalGL's DMG installs it into any Wine prefix or CrossOver bottle, and updates the app and the installed runtime when a new version comes out. The release also has install scripts and packages for x86_64 and arm64 Wine.
| Feature | Use |
|---|---|
| Install | Install WineMetalGL into a Wine found on your Mac (its default prefix), and turn it on or off |
| Custom install | Choose any Wine and prefix in Finder to install into |
| Install CrossOver | Install into a CrossOver bottle anywhere, with or without CrossOver installed, and turn it on or off |
| Game fixes | Turn quick fixes for tested games on or off |
| x87 acceleration | For older 32-bit games that use x87 math |
| Runtime logs | Turn on logs before launching, to see what fails and report it |
New in 3.7.0: arm64 Wine
WineMetalGL now runs inside native arm64 Wine: CrossOver 27's arm64 bottles and MetalSharp Wine, for native ARM64, x86_64, and 32-bit programs, with no Rosetta. install-wine-module.sh and install-crossover.sh work out which kind of Wine or bottle they're installing into and fetch the matching package.
Source and docs.
- Release 3.7.0: the DMG, the
x86_64andarm64packages, and the install scripts. - Conformance results and what isn't supported.
- Test suite, performance, and logging.
- Build it yourself: the core and the Wine module, installed into a Wine 11.x.
- License: LGPL-3.0-or-later. Files adapted from Wine are LGPL-2.1-or-later; the vendored glslang and SPIRV-Cross keep their own licenses.