Immediate mode GUI


Immediate mode GUI is a style of GUI implementation that uses immediate mode design in graphics libraries, in which immediate means that:
the client directly holds all widgets and composes the graphics objects to render the widgets of the complete GUI, or the client directly inserts the rendering primitives into a command list to render frame-by-frame.
Without the use of extensive indirection to retained resources and where:
This implies that in an immediate mode GUI, the client code is holding its own rendering primitives and API design which affect the graphics pipeline implementation.
The other major pattern of API design in graphics libraries is the retained mode. In the retained mode, the rendering primitives are managed by the GUI system/library, often hidden from the client code.

Widget toolkit

Most of the immediate mode GUI widget toolkit implementations are evolution from game development and particularly suitable when:
Typically an immediate mode GUI widget toolkit
Therefore immediate mode GUI widget toolkits are a good choice for all those who want a simple but easily changeable and extendable GUI toolkit. They are usually generic, open source and cross-platform. One way to have the flexibility and composability of an immediate mode GUI without the disadvantages of keeping the widget tree only in function calls with the lack of direct control how the GUI is drawn in the rendering engine would be to use a virtual widget tree - just like React uses a virtual DOM.
The original Immediate Mode GUI toolkit was imgui by Adrien Herubel which is based on OpenGL. The idea was popularized by Casey Muratori. There are others such as: