top | item 38713742

(no title)

cristeigabriel | 2 years ago

It does require some state in the back for everything to work as it does.

discuss

order

mort96|2 years ago

Of course. The API is stateless but the implementation isn't. That's usually how good immediate mode APIs work.

prewett|2 years ago

Dear ImGUI is just retained mode under the hood, with the name of the widget acting as the index. The API presents immediate mode, but it isn't really. If a "good" immediate mode API just hides all the state under the hood, then I think one should call it something other than immediate mode.

The thing is, immediate mode UIs are not really usable, because a widget needs internal state, so a pure immediate mode UI would require the caller to carry around all that state. Obviously that is burdensome, which is why Dear ImGUI hides it for you. But in my opinion, it's a bit of a fraud to call that an immediate mode UI, when it retains a copy of state behind its back.