[BR] OpenGL broken when using SideCar

Hi, I have discovered a curious problem today with the following setup:

2019 MacBook Pro running Big Sur 11.6.1
4th Gen iPad Air as a 2nd screen using SideCar

The issue is that if the iPad is running as the 2nd screen when standalone plugin starts this is the result:

It’s a curious issue:

  • SideCar running = OpenGL fails to work
  • SideCar running without OpenGL attachment code = everything renders as expected
  • Disconnect SideCar → start Stand Alone Plugin → reconnect SideCar = everything renders as expected (even on the iPad screen)
  • SideCar running also makes OpenGL break when running inside DAW (tested with AU/Logic)

No SideCar in Logic:

SideCar running in Logic:

NewProjectAudioProcessorEditor::NewProjectAudioProcessorEditor (NewProjectAudioProcessor& p)
    : AudioProcessorEditor (&p), audioProcessor (p)
    // comment out the following and everything works as expected
    if(auto* peer = getPeer())

    // Make sure that before the constructor has finished, you've set the
    // editor's size to whatever you need it to be.
    setSize (400, 300);

Attached a minimal example, although of course you’ll need a compatible iPad to be able to debug this problem.

glproblem.zip (7.4 KB)

Good luck!

1 Like

Gentle bump in case this got lost amongst ADC attendance. This affects all plugins built with JUCE (eg. Vital) and is somewhat frustrating. I hope it can be solved without too much pain.

Thanks, I can reproduce the issue on Monterey but not on Catalina. I also tried out a GLFW example on Monterey, and found that although the window updates correctly when it is on the main display, it doesn’t seem to refresh/repaint when moved to the iPad.

It looks to me like there’s a bit of work to do in JUCE to determine why apps don’t render OpenGL at all on Monterey when SideCar is enabled (I’ve added this to my backlog, but I’m not sure when I’ll get around to investigating) - I think it should be possible for them to work correctly as long as they are displaying on the built-in screen. Even then, it looks like it might not be possible for views using OpenGL to update correctly when they are displaying on an iPad via SideCar. If you’re aware of any OpenGL apps that do update correctly in this scenario, please let me know.

1 Like

In my case it was Big Sur and the issue is on both the built in screen and iPad.

If I “disconnect SideCar → start the app → reconnect SideCar” then everything works, so I suspect it’s something about the initialisation of the OpenGL context that is causing the issue.

Serum is working fine when SideCar is connected, but no way of knowing for sure if it is using OpenGL.

Do you have any suggestions for a non-JUCE plugin or app I can test that is for sure using OpenGL?

1 Like

For plugins, I believe that DISTRHO renders using OpenGL so you could try out some of those plugins: GitHub - DISTRHO/Mini-Series: DISTRHO Mini-Series

For a standalone app, the GLFW examples are quite lightweight and render using OpenGL. I tested the ‘particles’ demo: GitHub - glfw/glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input


I was unable to get the plugins to work, I tried the PingPongPan and it just crashed at startup in every host I tried regardless of SideCar being enabled or not.

The Particles demo of GLFW did however work, but would not update whilst the window was on the iPad.

But at least was able to see the effect whilst it was on the main screen, which is better than the current state of affairs with JUCE whereby cannot see anything on either screen.

Just to reiterate: If I start a JUCE plugin without SideCar connected (I just tried with Vital) then the UI is displayed, and continues to function after reconnecting SideCar, even when the plugin UI is on the iPad.
However starting the plugin whilst SideCar is connected results in a blank plugin UI.

IIRC also FabFilter which got some limited demo modes can be used for basic OpenGL testing.

1 Like

Has any more work been done on this? Wasn’t sure if it was happening in another thread or something, I am still seeing this issue.

1 Like

Bumping this as I also need to sort out this issue. Has anyone found any clues as to why this happens?


Another gentle bump on this issue. I’ve recently started working again from a shared office and utilising my iPad with Sidecar as a 2nd screen. It’s quite a pain to have to keep disconnecting everytime I need to test the plugin I’m working on.

I’m using 7.0.4 JUCE, macOS Big Sur 11.7.2 on an Intel MBP and 4th Gen iPad Air running 15.6.1

edit: I’d like to reiterate the point that when starting any JUCE Standalone/Plugin using OpenGL without Sidecar connected everything is fine, it’s then possible to reconnect Sidecar and everything continues to work, but if Sidecar is connected when starting up the UI is blank. So the issue must reside somewhere in the initialisation code of OpenGL.

1 Like

Sorry, it’s me again!

Any chance of an indicatation of if/when this will be looked at?

1 Like