Unsolved Metal-accelerated QPainter on macOS with MoltenGL?
The QPainter calls used for 2D drawing can be run on QOpenGLPaintDevice ( http://doc.qt.io/qt-5/qopenglpaintdevice.html ) as shown in http://doc.qt.io/qt-5/qtgui-openglwindow-example.html
I can construct a QOpenGLWidget ( http://doc.qt.io/qt-5/qopenglwidget.html ) and then possibly set the format to OpenGL ES 2.0.
The commercial MoltenGL library ( https://moltengl.com/moltengl/ ) provides a live translation of OpenGL ES 2.0 into the Apple Metal API on macOS and iOS.
So — would it be possible to use the QPainter engine with QOpenGLWidget in such a way that Qt actually “draws to MoltenGL” on macOS and then MoltenGL uses Metal to accelerate the drawing?
Since Apple is deprecating OpenGL and there is currently no Vulkan-based QPainter engine (where then MoltenVK could be used) — I think Qt widgets with QOpenGLWidget that uses OpenGL ES 2.0 and with MoltenGL could provide a sensible way forward for hardware-accelerared Qt widget rendering on the Apple platforms.
But is this easily possible?
SGaist Lifetime Qt Champion last edited by
That's something you should rather bring to the interest mailing list. You'll find the Qt's developers/maintainers. This forum is more user oriented.
Note that there's experimental support for MoltenVK on macOS planned for 5.12. You should be able to play with it using the dev branch.