Hacker News new | ask | show | jobs
by bogwog 1410 days ago
That's just an implementation detail. The main benefits of an immediate mode UI is the API for using it. There's no reason that the loop has to run at 60 FPS. It could even be event-based, so it only updates when the user does something, for example.
1 comments

Yes and no. That API makes certain approaches easier and other harder. Even if you manage to render only the changed parts of the screen, you still execute all your UI logic all the time so the renderer can be aware of what changed in the first place. Also, more involved stuff like animations become much more complex once you go event-based, to the point where retained mode UI may end up being a better choice from the API perspective. It all depends on what exactly you're implementing, and games often are a natural fit for immediate mode as they usually allow to keep it simple with no real downsides.