Apple Metal

Hi Juce team !

I was wondering if there any plans to support Metal rendering ?

Thanks !

1 Like

Are you talking about creating a bare context or a Graphics backend?

For creating a context like the OpenGL component, I don’t see much point. Creating a Metal context requires very little boilerplate code, and it’s all native and fairly application specific. It would probably be a lot faster to whip up your own native Metal context and use it with a ComponentPeer.

When it comes to a backend, CoreGraphics already runs on Metal (pretty heavily abstracted, of course), and the Graphics implementation is a pretty thin layer. So there’s a pretty good chance there wouldn’t be a big benefit for a massive undertaking.

1 Like

I indeed meant backend.
I doubt your assertion regarding performance because it would mean that the CoreGraphics renderer is right now as fast as the opengl renderer for example and this is clearly not the case.
So why would this be true for Metal which is supposed to be faster than OpenGL ?

Hey jonathonracz - you suggested using a Metal context with a ComponentPeer. How would you do this? I can create a Metal context, But, how does one connect it with a ComponentPeer? I’m not trying to use Metal as a Graphics backend, just do some custom drawing on a Metal surface and display in a JUCE Component.


Nevermind - it looks like NSViewComponent is there for this purpose. I think it’s solved.