High cpu usage when using open gl


I’m working on an equalizer plugin and I’m trying to get fluent paths animations for the spectrum analyzer and the magnitude curves.

For my whole graph component, I would like to inherit from the OpenGLRenderer class and write native openGL code instead of using the regular fillPath method that is the bottleneck of my code right now, whatever I use the software or the open gl renderer.

Unfortunatly, when I inherit from the OpenGLRenderer class and set openGLContext.setContinuousRepainting(true); the CPU load is 100% on one core, both in Debug/Release mode.

I can reproduce this issue with an app freshly created from the Projucer with adding the public juce::OpenGLRenderer inheritance on the main component and by setting openGLContext.setContinuousRepainting(true);

When profiling from VS the CPU activity, there is a strong CPU activity on the deactivateCurrentContext() function. (>90%).

Any help would be appreciated :slight_smile:

Juce 6.0.4
i7 9750H, 24GO RAM,