I'm trying to design a button component that glows when you hit it, then gradually fades back to its inert colour.
The computer can also trigger this glow.
I'm going to have a lot of these objects on-screen, maybe 100, so I'm trying to figure out an efficient method of implementing it.
One possible use case scenario: I give each of the 12 pitch classes its own colour, and arrange the 88 piano notes in a spiral that wraps around at the octave.
How could I go about doing this?
I'm thinking that it could be accomplished GL, passing in a texture for the inert button, and for the glowing button, and feeding in a colour and glow (float) uniform for each frame.
But I sense I may only be able to batch these into the same draw call if they all are children at the same component.
Which wouldn't be the end of the world, but it would be much nicer architecture if I can have different components containing these buttons. Maybe one draw-call per component would be fine.
Might there be some way of doing this without getting into GL? It would be nice to get a passable implementation for my prototype, and rewrite something optimal further down the line. Also as I'm new to Juce, I could easily get bogged down for several weeks with this, so I would much rather get something simple running to start with.