Themeing component or integration with implot / imgui

Did anyone try integrating implot or imgui into JUCE? The current plotting components JUCE provides are pretty basic or not easily to style. Implot is advaced plotting library and easy to use not only to plot many plots but also to draw spectrogram (the one in JUCE is slow and not very good looking). So far I have been prototyping my app with openframeworks and imgui+implot but looking at migrating to JUCE.

https://github.com/epezent/implot
https://github.com/epezent/implot_demos

Also maybe I missed something from the tutorial regarding custom styles but do we really need to have to reimplement drawing functions for pretty much every component? Or is it possible to change something more than just some colors e.g. corner size, width, height, background colors, text color etc. Is trying to implement similar skin like in https://github.com/pmndrs/leva even possible without basically rendering all my widgets to canvas provided by JUCE?

Juce graphics are sorely lacking once you venture outside of the stock feature set. It’s not hard to make custom components, but the performance is mostly horrible once you need any kind of animation, glow/shadows or gradients. But it’s really good at drawing solid coloured static rectangles!

If you want moving histograms without the skips, you have to use the OpenGL aspect of juce, and use actual OpenGL drawing, via vertex buffers. Simply attaching a context to a competent will not do, as JUCE will still render on the cpu and pass that to the gpu once it’s already rendered. Once apple cut off OpenGL, you may have a huge issue if you take this route, plus some users have issues with OpenGL on their machines, so in any case you should have a cpu only fallback draw method.

TLDR; JUCE does a lot of stuff, performant modern GUIs is not one of them.

2 Likes

There is now a JUCE backend for imgui: imgui_juce.

3 Likes

This is potentially awesome! Gonna play with this.

1 Like