Hacker News new | past | comments | ask | show | jobs | submit login

Does imgui re-render everything every frame or does it do a "diff and patch" technique as well?





With 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.

> 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.


As 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....


The 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.

Yes, 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.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: