3 ms·
Does imgui re-render everything every frame or does it do a "diff and patch" technique as well?
by hellofunk 7y ago
Does imgui re-render everything every frame or does it do a "diff and patch" technique as well?
- FraKtus 7y agoWith imGui you must fully describe your interface at each frame. Because it's fully GPU accelerated it does not cost that much and run very fluently at 60 FPS.
- hellofunk 7y agoThe rendering is on the GPU but the description of the UI is created and executed on the CPU, and then the results are sent to the GPU, is that right? In other words, it works a little like a video game.
- FraKtus 7y agoYes, you describe your UI from the CPU code and it gets accumulated into a draw list. Differents backends (OpenGL, Direct X, Metal ...) sends them to the GPU for display. It's close to what a game is doing.
- kaoD 7y ago> it does not cost that much and run very fluently at 60 FPS But it drains your battery like crazy. Immediate mode GUIs are good for games, which already render the whole scene @60FPS and are expected to be costly, but re-rendering your whole window every frame even when idling is just a waste of power.
- ocornut 7y agoAs mentioned the cost is negligible when you already have a animated 3D scene with the case for games. For non-game (desktopey) app, well, there's no reason to render at 60 FPS you should only render on user interaction otherwise go idle most of the time....