I'm working on a plugin that uses two components that use OpenGL for rendering. Each is derived from OpenGLRenderer and they have their own OpenGLContext.
When I look at the CPU usage in Instruments I see:
Running Time Self (ms) Symbol Name 7187.0ms 47.5% 0.0 juce::MessageManagerLock::MessageManagerLock(juce::Thread*) Running Time Self (ms) Symbol Name 5401.0ms 35.7% 0.0 juce::MessageManagerLock::MessageManagerLock(juce::Thread*)
My plugin is spending 83.2% of it's CPU time trying to grab the message manager lock from within OpenGLContext::CachedImage::renderFrame()
Should I be sharing a context between the two compnents? What is the correct way to work around this? I'm using an older version of Juce, I haven't upgrade to 4 yet.