|
|
|
|
|
by pciexpgpu
2606 days ago
|
|
The author does a good job explaining some benefits of an immediate mode renderer but vastly misses the disadvantages. The immediate mode renderer is great for toy programs. Similar to how you could reproduce 'look here is how simple it is to write hello world and compute the millionth digit of PI' in a new esoteric language... Occlusion, hit-testing, state changes, scrolling/animations even in the simplest forms will fall over. Infact, that's why we have every major browser move their touch and animation systems into a layer based compositor system (into a separate thread / process). The author also grossly misses their own example of 'how a spreadsheet with many rows and columns will update faster using ImgUI' and how Instagram styled apps will fare better ImgUi. A retained mode renderer will use virtual scrollers, efficient culling of nodes for both display and hit-testing (scale to billions of virtual cells) and more importantly help a team of people coordinate their work and get things done. We are no longer in the 90s. |
|
Function call tree has some advantages. Functions are wonderfully composable and flexible.
React is such a revolution because it translates ImGUI usage into whatever insane retained mode API is at the bottom of the stack, through intermediate representation of virtual dom.
Presto. You have flexibility and composability of ImGUI without disadvantages of keeping your gui tree only in your function calls, and you can use it without ability to directly control how the GUI is drawn in the engine.