3 ms·
>Other than game-development why is im-gui better than those normal widget kits we are relatively more familiar with: gtk, qt,etc)? I was tasked with using bot
by AussieWog93 5y ago
>Other than game-development why is im-gui better than those normal widget kits we are relatively more familiar with: gtk, qt,etc)?
I was tasked with using both types of frameworks back in my old job.
ImGui eliminates entire classes of bugs related to state synchronisation, and was much easier to make performant because it was overall simpler[1].
It's also much simpler to customise, as widgets are nothing more than functions that draw graphics according to a couple of input variables.
I think a lot of people get confused, as they think ImGuis mean redrawing every asset every frame and therefore performance should be bad. In practice, though, there are driver-side caches and it's absolutely excellent to both work with and use the results of.
[1] While in theory retained-mode GUIs should be as performant as ImGuis or better, in practice it's much easier in retained-mode to accidentally perform an expensive action multiple times in a row in response to a single user interaction. Just tick "select all" on a WordPress page with 100+ elements and you'll see it immediately (well, immediately after several billion cycles have passed anyway!).