3 ms·
Thanks for the kind words. My thinking has evolved since that video; my blog at https://raphlinus.github.io/ https://raphlinus.github.io/ is a good place to che
by raphlinus 6y ago
Thanks for the kind words. My thinking has evolved since that video; my blog at https://raphlinus.github.io/ https://raphlinus.github.io/ is a good place to check.
As flohofwoe suggests in a sibling, combining an imgui-like API with an actual retained widget tree would be something of the best of both worlds. That is indeed pretty close to what the Crochet prototype does. We're not trying to exactly match the imgui but it's pretty close. In particular, getting actions back from widgets (like button presses) is the return value from calling the widget-creating function. That's a notable difference from, say, Jetpack Compose, which is fairly imgui-like on widget creation but pretty much uses callbacks for those actions. Crochet does solve the page tearing problem (though the current implementation is hacky, don't look too closely under the hood).
Another note - the Dear ImGui implementation has become a lot more sophisticated over the years, and is no longer a simplistic implementation of the immediate mode GUI concept. It has unique id's for widgets, its text processing has become better, etc.