I can't find a clear explanation of "immediate mode" GUI creation (which this library enables) but it appears to be the sort of paradigm that pre-dated object-oriented and event-driven interaction handling that became the norm in the mid 90s (especially after the popularising of dev tools from Borland and Microsoft eg. Visual Basic etc), so I guess it is a formalisation of the procedural (?) methods from the era prec…
This library has functions such as add_button() that can be used to create a hierarchy of widgets. From this, I suspect that the library is not fully operating in immediate mode, but perhaps it uses some kind of mixed mode?
DearPyGui
21–30 of 72 posts
Re: DearPyGui
#22Earlier quoted context omitted.
Immediate Mode GUIs are just GUIs that are instanced and drawn immediately during a single frame. There's no need to persist any object or structure because the whole screen will be cleaned and redrawn in the next frame. Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. This is in opposition from retained-mode, where things are re-rendered only when necessary, lik…
> Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. That makes no sense though because while you still need to re-render each frame, you do not necessarily have to waste rendering time on GUI each frame when GUIs are mostly static, why not just render the interface to a framebuffer and then simply draw that when composing a frame and only re-draw the framebuffer w…
https://www.glfw.org/docs/latest/group__window.html#ga554e37...
Re: DearPyGui
#23How is it different from https://flutter.dev/desktop
For starters, this library may not be suddenly killed off.
""" Ongoing Dear ImGui development is financially supported by users and private sponsors, recently:
Platinum-chocolate sponsors
Blizzard, Google, Nvidia, Ubisoft """
Joke aside, google did a lot of good for imgui's development. I guess they all love side projects.
Re: DearPyGui
#24I can't find a clear explanation of "immediate mode" GUI creation (which this library enables) but it appears to be the sort of paradigm that pre-dated object-oriented and event-driven interaction handling that became the norm in the mid 90s (especially after the popularising of dev tools from Borland and Microsoft eg. Visual Basic etc), so I guess it is a formalisation of the procedural (?) methods from the era prec…
Immediate Mode GUIs are just GUIs that are instanced and drawn immediately during a single frame. There's no need to persist any object or structure because the whole screen will be cleaned and redrawn in the next frame. Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. This is in opposition from retained-mode, where things are re-rendered only when necessary, lik…
This isn't quite correct, at least for the library internals. Dear ImGui does persist UI state between frames, the "immediate mode" term only describes how the API looks like to the user, not how the library behind the API is implemented. The user code doesn't need to keep "widget handles" around, and there is no "event handler code" that is called asynchronously. From the user's point of view, control flow is entirely sequential, the UI is described and input events are processed in the same linear control flow context. But this is just what the library user sees, what happens under the hood is very different (e.g. the internal UI state is not rebuilt every frame from scratch, instead the API calls cause changes to the internal UI representation, those API calls just happen to also contain all the information needed to create the required internal UI state if it doesn't exist yet).
There's also nothing preventing the library from only redrawing what has changed, it just turned out that redrawing everything is usually so fast that only drawing what has changed would just add complexity to the implementation for very little gain (even complex ImGui UIs are usually a few dozen drawcalls at most and don't take up any significant chunk of the per-frame budget).
This description may be simplified and in details also slightly incorrect, but it's important to point out that "immediate mode" only applies to the API, not to the implementation, because this argument is often brought up by critics (who often don't quite understand what the "immediate" in "immediate mode UIs" is actually about) as a reason why immediate mode UIs can never be as efficient as traditional "retained mode" UIs (in reality they usually are more efficient than traditional UIs, and situations where traditional UIs are ahead can be optimized in immediate mode UIs just as well).
Re: DearPyGui
#25Earlier quoted context omitted.
Immediate Mode GUIs are just GUIs that are instanced and drawn immediately during a single frame. There's no need to persist any object or structure because the whole screen will be cleaned and redrawn in the next frame. Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. This is in opposition from retained-mode, where things are re-rendered only when necessary, lik…
> Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. That makes no sense though because while you still need to re-render each frame, you do not necessarily have to waste rendering time on GUI each frame when GUIs are mostly static, why not just render the interface to a framebuffer and then simply draw that when composing a frame and only re-draw the framebuffer w…
Perhaps in low-power situations it's a different story, though.
Re: DearPyGui
#26Earlier quoted context omitted.
Immediate Mode GUIs are just GUIs that are instanced and drawn immediately during a single frame. There's no need to persist any object or structure because the whole screen will be cleaned and redrawn in the next frame. Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. This is in opposition from retained-mode, where things are re-rendered only when necessary, lik…
> Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. That makes no sense though because while you still need to re-render each frame, you do not necessarily have to waste rendering time on GUI each frame when GUIs are mostly static, why not just render the interface to a framebuffer and then simply draw that when composing a frame and only re-draw the framebuffer w…
Some games did that in the past, and some might still do it!
But keep in mind that today the performance gains are so negligible when compared to the rest of the things you have to render on a single frame that the added complexity and the amount of things that could go wrong (glitches) are normally not worth it.
Also, copying that temporary framebuffer to the screen on each frame is not free and involves copying between two memory locations, whereas procedurally drawing things only involves CPU (or GPU) + the main framebuffer, which is super fast in comparison.
Re: DearPyGui
#27Earlier quoted context omitted.
For starters, this library may not be suddenly killed off.
https://github.com/ocornut/imgui """ Ongoing Dear ImGui development is financially supported by users and private sponsors, recently: Platinum-chocolate sponsors Blizzard, Google , Nvidia, Ubisoft """ Joke aside, google did a lot of good for imgui's development. I guess they all love side projects.
Re: DearPyGui
#28Earlier quoted context omitted.
Immediate Mode GUIs are just GUIs that are instanced and drawn immediately during a single frame. There's no need to persist any object or structure because the whole screen will be cleaned and redrawn in the next frame. Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. This is in opposition from retained-mode, where things are re-rendered only when necessary, lik…
> Immediate mode is popular in video games because in most games the screen is re-rendered on each frame. That makes no sense though because while you still need to re-render each frame, you do not necessarily have to waste rendering time on GUI each frame when GUIs are mostly static, why not just render the interface to a framebuffer and then simply draw that when composing a frame and only re-draw the framebuffer w…
Re: DearPyGui
#29Earlier quoted context omitted.
I read the question as asking about the differences (advantages and disadvantages) of the two
This is correct
Anyway, I don’t think ImGui can be used for app development for neither Android or iOS and Flutter doesn’t seem to allow you to use other languages than Dart (at least that’s my impression).
Re: DearPyGui
#30Oh, I love Dear Imgui -- it's very simple to use and has a nice... "engineering"/scientific aesthetic. Good to hear it's been ported to python. If you're looking for an end-user product, this may not give you the control you're looking for. But if you're looking for a dead-simple way to create a quick GUI for a side project, this is perfect.