How to have Qt interoperate with Metal (using the new Metal-cpp)?
-
I'm currently considering Qt widgets for a new project, where I would like to write my own rendering pipeline in Metal. Apple recently released bindings to use Metal from C++. I'm now trying to combine this Metal-cpp example with some of the Qt macOS examples found here.
The problem I'm running into is that the main boundary between Qt and Metal seems to be MetalKit, which is not wrapped by the Metal-cpp library (only Foundation, Metal and QuartzCore are). There is a QuartzCore/CAMetalDrawable.hpp referencing a CAMetalLayer, which seems the way to go, but I'm unsure of how to use it with a Qt window. Could anyone show/tell me how to setup Metal-cpp such that I can render into a QWindow, or even better, into a single widget?
-
Did you ever get an answer to this? I want to use many features of Qt but need to support Metal and it doesn't seem like there is an easy way with Qt widgets.