|
|
|
|
|
by goodpaul6
880 days ago
|
|
I'm not sure the perf/battery life tradeoff is a necessary aspect of immediate mode UI. while (running) {
event := get_next_event()
process_event(event)
repaint()
}
You could just have get_next_event block until there is a meaningful event that occurs (e.g. mouse click). You could even have your UI report "interactive" rectangles to the event layer to prevent it from producing e.g. mouse move events that are irrelevant.IMGUI is just a different API design IMO. |
|
And then what?
With this one innocuous seeming sentence you are hand waving a way a ton of complexity. If you try to implement it you will at least have some respect for toolkit authors.
> IMGUI is just a different API design IMO.
Yes one that is lower level and therefore is fundamentally harder to deal with to get all the things people take for granted in a full blown mature state based GUI toolkit.
You can implement a retained GUI toolkit with IMGUI. Or you can use something already done.
IMGUI eschews this complexity as part of its purpose but it comes with trade offs that limit its use cases.