I have an issue when having a ControlP5 button showcased and when clicked it hides. This works fine but then I have a game in the background and the FPS drops drastically, note that without the button the issue doesn’t exist. I presume the button is still loaded causing the issue. Any fixes ?
It is easy to get tunnel vision and assume that the problem is with the button but controlP5 is a popular and has been arround fo over 12 years to my knowledge, if it was a problem in the libraries source code you would expect it to have been detected and reported by someone else by now.
I haven’t used the library, but does your sketch involve using the P2D renderer with scale() by any chance? Pretty random, but I was doing a project with the P2D renderer and whenever you zoom in too much using scale(), everything starts to disappear (lines first then ellipses iirc) and fps suffers terribly. Switching to P3D solved the issue.
It sure is 2D I have a world generation with Perkin noise which is has a hefty Clas that uses slot of resources but this is Hedy beef is temporary but without the buttons still runs fine.