In Herit , public juce::OpenGLRenderer
void newOpenGLContextCreated() override;
void renderOpenGL() override;
void openGLContextClosing() override;
Constructor: (After size is set)
→ use this like paint
auto desktopScale = (float) openGLContext.getRenderingScale();
float height1 = desktopScale * 675;
float width1 = desktopScale *675;
std::unique_ptr<juce::LowLevelGraphicsContext> gc (createOpenGLGraphicsContext (openGLContext, width1, height1));
if (gc == nullptr)
juce::Graphics g (*gc.get());
// in here multiply your pixels by the desktop scale.
Then you can use that function like your paint method with Juce’s design and to my understanding it processes on the graphics card instead of the processor. Also when I used a timer callback with around that same repaint() speed from my animation on Drip. It freezes most Mac daws background.
The old open GL did have weird stuff with plugins around two years ago when I released X. Like it wouldn’t let me open more than one plugin. However, I just did an update to open gl rendering the dynamics are way smoother.
I know I’m not the best programmer and hack stuff together. As @Daniel mentioned if your just displaying the data wrong then its wrong. But trying to sync the audio and graphics thread as always been a head ache. At least with the continues repainting you won’t have have to deal with 50 ms jumps.
I think OpenGL is 60 hz. You can still use you timer callback just don’t repaint.
Idk it helped me and I’m done with the paint method for now because it will slow down MacOs.