But then you have state in two places, user code and the retained-mode GUI framework, which need to be synced - that's where complexity creeps in. Immediate mode removes that redundancy and makes things simpler in many situations. It depends on your preference and what you're doing too, which approach suits better.
But then you have state in two places, user code and the retained-mode GUI framework, which need to be synced - that's where complexity creeps in. Immediate mode removes that redundancy and makes things simpler in many situations. It depends on your preference and what you're doing too, which approach suits better.
But why do you think retained mode was invented if "just drawing" is so simple?
Here's an informative explanation in the DearImgui library which chose this approach.
https://github.com/ocornut/imgui/wiki/About-the-IMGUI-paradi...