OpenGL roadmap


#1

Hey guys -

Forgive me if I’ve missed this somewhere, but I was hoping to get some clarity on upcoming openGL fixes + changes (on mac).

Specifically, it seems that having multiple windows with attached openGL contexts is still an issue, and that there are still some CPU problems as well. At least, that’s what I see from perusing the forum.

Any chance you can tell us how and when you think these will be addressed?

I also get a bunch of UI API called on a background thread warnings since updating to the latest. The stack traces shown go through juce::OpenGLContext … and I don’t see any of my classes, so I think this must be a consequence of attaching the context to a window as well (?).

And then more generally, I know that openGL is deprecated in Mojave and will be removed from mac at some point. Does anyone have any idea how soon that is expected, and what is the plan for Juce?

Will Juce::openGL continue to function as normal, but we will need to download/link openGL as a third party on mac? That seems like a likely solution.

Is there any plan to integrate the new mac “metal” (or whatever it’s called) framework?

I guess, ideally (in the distant future), there would be some sort of juce::AcceleratedGraphics class that uses openGL on windows and mac::metal on mac? Thats the easiest for us and the hardest for you, of course :slight_smile:

Anyway, just trying to get some understanding so I can plan accordingly.

Thanks for all the amazing work!


#2

In case you’re interested, here is an example of Metal rendering in JUCE:

It uses the juce::NSViewComponent to float a hardware layer over the component. At a higher level I have a RenderingSurface base class (like your proposed AcceleratedGraphics). It could easily be implemented for OpenGL as well.

I don’t think would be desirable to try and wrap the Metal API and expose it in JUCE. It changes all the time, and who knows what Apple will do in the future. However, I would be interested to know which services people around here think a hypothetical juce::AcceleratedGraphics class should provide. My RenderingSurface just has a method for rendering triangles.

Thoughts?