I just included it as a member variable to PluginEditor, and called the attachTo() method from the editor’s constructor. In my case, the PluginEditor just contains a ResizableCornerComponent and my PluginGUI component (which contains my GUI and a tooltip window). I didn’t call setComponentPaintingEnabled as it defaults to true anyway.
Looking at your error at line 200 - there is no assert at that line in the version of juce_opengl.cpp I’m using (module version 2.0.19). Perhaps a fresh pull or clone would be in order?
PS - thanks to your post, I noticed I wasn’t calling detach() :oops:
I just wanted to make sure, if i attach opengl to my content component of my main DocumentWindow witch is on the desktop, then all the child components will get the GL renderer as their parent? Cause that’s what i did here so in that case i should never get any non-gl rendered components, as all my child components are children of the main editor. Or perhaps i’m missing something obvious ?
Sorry Andrew, I didn’t notice your question before. It seems a bit odd, but it’s not something I’ve seen myself… Mac or PC? Can you track it down to the line of code where there’s a delay? It might just be the debugger loading all the GL DLLs into memory or something.
I’m having trouble tracking down the line that causes the delay. I can see it gets to line 1202 in juce_VSTPluginFormat.cpp OK (componentPeerChanged()). But after that it starts complaining that the source file is different from when the module was built and it’s hard to tell where I am (clean & rebuild doesn’t help).
I’ve noticed that if I close and re-open the editor it again takes a few seconds to open. So I don’t think the delay is due to loading the OpenGL DLLs.
Unfortunately my GUI feels a bit jerky with OpenGL, so I’ll probably stick with the software renderer anyway. If I could LCD optimise that I’d be in seventh heaven