OpenGL and JUCE wizardry

The Component drawing pipeline isn’t really designed to cope with that scenario because when you’re calling paint you don’t have the option to switch shaders. …And proper blur is a multipass shader effect. You really need finely tuned control over which FBO and/or texture(s) you’re applying shaders on.

Basically you’re trying to use OpenGL like a game engine which JUCE has its architectural flaws that I mention here. The current OpenGL system draws everything into one texture after breaking it all down into scanlines using an EdgeTable.

You would have better luck getting what you want by writing your own OpenGL renderer (excluding JUCE’s logic) so you can attribute independent FBOs (and textures where appropriate) to Component objects, and this way you can apply shaders when needed (eg: to fill with a colour or gradient, to blur, etc…).

1 Like