Immediate mode (computer graphics)

Immediate mode is an API design pattern in computer graphics libraries, in which without the use of extensive indirection – thus immediate – to retained resources.

In immediate mode, the scene (complete object model of the rendering primitives) is retained in the memory space of the client, instead of the graphics library.

This involves significant bandwidth and processor time (especially if the graphics processing unit is on a separate bus), but may be advantageous for data generated dynamically by the CPU.

Although drawing commands have to be re-issued for each new frame, modern systems using this method are generally able to avoid the unnecessary duplication of more memory-intensive display data by referring to that unchanging data (via indirection) (e.g. textures and vertex buffers) in the drawing commands.

[6][5] Prominent implementations include Omar Cornut's Dear ImGui[7] in C++ and Nic Barker's Clay[8][9] in C.

Schematic explanation of an immediate mode graphics API
Schematic explanation of a retained mode graphics API in contrast