Plugins with OpenGL don't work as VST2 under Wavelab on macOS

When opening the plugin GUI, Wavelab (tested with both 7 and 9) seems to shortly move the UI offscreen, which invokes NSViewComponentPeer::redirectWillMoveToWindow, which detaches the OpenGL context. Wavelab then moves it back to the screen but the OpenGL context stays detached…
Also filed at the bug tracker at https://github.com/julianstorer/JUCE/issues/120

Running on macOS 10.12 with latest JUCE (develop branch).

Also tested with Yosemite 10.10.5, same results.

This can be reproduced in a slightly modified JUCE demo plugin (to use OpenGL):

  • Add the juce_opengl module via the projucer
  • Add an OpenGLContext context; member in JuceDemoPluginAudioProcessorEditor.
  • Add context.attachTo (*this); context.setContinuousRepainting (true); context.setRenderer (this); in its constructor and context.detach(); in the destructor.
  • Make the editor inherit from OpenGLRenderer and add empty void newOpenGLContextCreated() override {} and void openGLContextClosing() override {} methods.
  • Add void renderOpenGL() override { glClearColor (1.0, 0.0, 0.0, 0.0); glClear (GL_COLOR_BUFFER_BIT); } which paints a red background using OpenGL.
  • Remove its paint method.

Now the demo plugin, with its new red background, should look like this (screenshot in Logic):

In Wavelab, due to the context detaching by a work-around added in JUCE for debug assertions (https://github.com/julianstorer/JUCE/issues/88), it looks like this:

The lack of red background here indicates that OpenGL isn’t used here…

I would really appreciate a response to this, as this seems to clearly be a JUCE bug - the OpenGL context gets detached in NSViewComponentPeer::redirectWillMoveToWindow as if the plugin implementor deliberately decided it doesn’t need to be attached, and when Wavelab brings the view back into a window there’s nothing there to reattach it… So calling detach is probably not a good work-around for the previous problem.
I wonder if the work-around for issue 88 can safely be reverted, as I’d prefer false assertions in debug than the plugins not working in Wavelab (or any other host that shares it behavior).

Just to be clear, does this mean that Juce OpenGL doesn’t work in VST2 plugins at all? We’re seeing similar behavior in other hosts besides Wavelab.

JUCE’s OpenGL doesn’t work in VST2s in Wavelab on macOS. It does work in other hosts/systems, for example in Reaper.

In what other hosts do you see this behavior? Can you try building with this branch https://github.com/soundradix/JUCE (where we fixed this problem) and see if it helps?

Cheers, Yair.

Thanks for those fixes Yair. So far it’s working for me (VST2 + macOS Sierra + WaveLab Elements 9 (VST3 does not work)). I’ll report any issues I run into.

1 Like

For VST3, does it work in most recent JUCE tip? It was recently reported fixed at Wavelab 9: presents blank plugin GUI

Ah yes it does! I had the VST3 build option disabled…forgot it wasn’t getting updated.

1 Like