Multiple windows with GL contexts

From other threads here, I’ve come to understand that you shouldn’t use multiple GL contexts attached to multiple documentwindows (all in the same process, of course).

Depending on who you ask this will either give you a black screen, or massive performance drop.

Is this correct? The threads I’m viewing are rather old, so this may have changed.

And if so … can we really recommend openGL in plugins? I mean, even if very few DAWs use openGL, surely you could have multiple plugins using openGL, or multiple instances of the same plugin for that matter. Won’t you get this same issue?

Actually, testing here is seems that multiple windows all running with openGL contexts attached is fine.

What is not fine is a documentwindow with an attached GLContext and with a content component that also has an attached context (see screenshot).

That seems like a different issue though. More like a context inside a context, which is understandably probably not a best practice.

Anyway, would welcome any thoughts or guidance.

I recently tried to use multiple windows with openGL contexts on Linux and failed in doing so: Every time the windows overlapped, the entire GUI freezed. However, this was on Linux, where openGL with NVidia Gtx cards behaves very strangely anyways (laggy with vsync, 10k FPS without). So this might not be representative. I’m not sure that my way to set up openGL is the right way to do either, since there was very little information when I started out.

Anyways, I’ll follow this thread for more information :+1: