3 ms·
> There is also another way of making GUIs called Immediate Mode that is commonly used for drawing user interfaces in games. In this mode the GUI components are
by smhg 6y ago
> There is also another way of making GUIs called Immediate Mode that is commonly used for drawing user interfaces in games. In this mode the GUI components are no longer subscribing and waiting for events to come, but are instead a part of the main loop that runs at 60 fps and re-render themselves based on the current “global” state.
> Immediate Mode GUIs somehow never reached the critical mass and you are probably not going to find it outside of the games industry.
Isn't this what React is built on? I think this was part of the 'original' selling point by Pete Hunt: https://youtu.be/x7cQ3mrcKaY https://youtu.be/x7cQ3mrcKaY (2013). Around 20:00 in that video he compares React with the Doom3 engine.
- jonathanaird 6y agoYes, Flutter does this as well and they’re both very popular. When done properly, UI is a pure function of state and you have some simple mechanism for notifying the UI that state has changed.
- millstone 6y agoHow does this work with e.g. a text editor? It doesn't seem practical to have your UI be a pure function of an input which is 100+ MBs of text and formatting.
- jonathanaird 6y agoBoth Flutter and React will take the next UI frame and figure out what the diff is between the last frame and the next and only apply the difference. In React it’s called the shadow dom. Flutter will also only render what it needs to so you shouldn’t render the entire file at once. Just render what’s on screen and lazy load as you’re scrolling.
- deleted 6y ago[deleted]