Started adding this to my local copy of my fork. I'll do some light sanity testing and push them to github in a day or two when I have time to test some more. Plain AddRect() is in the top right window (realized it's hard to see because I was making things blue after I finished checking the window).
View attachment 23369
Basically they need a window to render to, so you could create one imgui window that covers the entire screen, make it transparent, NoInputs, etc like you're already doing, and then render all of the primitives directly to it.
Would you be willing to quickly test if they fix the performance issue once I push the changes? You'll need to build the plugin from source. If they work fine, I can ask Soly to do a new release with these changes (this would also include my 2022 fix for 'white addons' at main menu and disappearing ingame in dark rooms).
There is a "require_version" function in the plugin's pso table. You can check if pso.require_version is nil or if pso.require_version(<whatever the next version is>) returns false to know if someone needs to update their addon plugin, in case you want to support the old way or tell people to upgrade.