NewProjectAudioProcessorEditor::NewProjectAudioProcessorEditor (NewProjectAudioProcessor& p)
: AudioProcessorEditor (&p), audioProcessor (p)
{
// comment out the following and everything works as expected
if(auto* peer = getPeer())
{
peer->setCurrentRenderingEngine(0);
}
openGlContext.attachTo(*getTopLevelComponent());
// 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.
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.
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?
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.
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.
Sorry, this is a bit of a niche use-case and the team is busy with work that will be impactful for a larger proportion of our users. I’m not able to estimate if/when we will be able to investigate this issue.
I beg to differ. Sidecar is super easy to set up (and free!) compared to the legacy products that did similar and really useful for people in the Apple eco-system (and let’s face it, usually if you own one Apple product you end up with more). Perhaps more users aren’t aware how useful Sidecar is for mobile production, because as it stands everysingle JUCE based plugin that uses OpenGL is handicapped by this issue, so I’m honestly surprised that there aren’t more vendors here pushing for this to be fixed, but can only assume they aren’t getting support cases for “why is your plugin blank when I use Sidecar?”. Oh well.