Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Using the "Metal" graphics framework on Mac OS X 10.11 with QOpenGLWidget?
Adam T last edited by
Qt comes with an OpenGL implementation that includes a QOpenGLWidget class which can be used (in my case) for accelerated 2D rendering. Since Mac OS X 10.11 El Capitan, Apple provides its own native framework for fast graphics called Metal, which seems to be about 3x faster than when using OpenGL.
Are there plans for the Qt developers to create a "Metal backend" of sorts for widget-based Qt5.x?
There is a commercial library called MetalGL ( https://metalgl.com/ ) which is an implementation of the OpenGL ES 2.0 API that runs on Apple's Metal graphics framework on Mac OS X (and iOS). Has anyone used it with widget-based Qt5 apps on Mac OS X, so that one would use QOpenGLWidget but instead of Qt’s own OpenGL backend, it would use Qt’s OpenGL ES backend piped to MetalGL?
MetalGL only supports OpenGL ES 2.0 at this point, not “full” OpenGL. Qt “intelligently” uses either OpenGL or OpenGL ES, depending on the platform ( http://doc.qt.io/qt-5/qtgui-index.html#opengl-and-opengl-es-integration ). I’m not sure whether Qt on Mac OS X can be easily “forced” to use GLES. However, there is the opensource Regal library ( https://github.com/p3/regal ) which provides a user-space OpenGL layer for an OpenGL ES 2.0 context. So I imagine that, at least in theory, it would be possible to build a Mac OS X app that uses Qt’s QOpenGLWidget classes, and then “pipe” Qt’s full-OpenGL calls through first Regal (which will translate them into OpenGL ES 2.0), and then through MetalGL. Is this something that anybody perhaps attempted?
Hi and welcome to devnet,
There was a thread on the interest mailing list about the use of Metal for iOS here
I don't know if anything has changed in between but since you are interested by this, you should post your questions on the interest mailing list You'll find there Qt's developers/maintainers (this forum is more user oriented)