Immediate mode (computer graphics)
Immediate mode is an API design pattern in computer graphics libraries, in which
- the client calls directly cause rendering of graphics objects to the display, or in which
- the data to describe rendering primitives is inserted frame by frame directly from the client into a command list,
Retained mode is an alternative approach. Historically, retained mode has been the dominant style in GUI libraries; however, both can coexist in the same library and are not necessarily exclusive in practice.
Overview
In immediate mode, the scene is retained in the memory space of the client, instead of the graphics library. This implies that in an immediate mode application, the lists of graphical objects to be rendered are kept by the client and are not saved by the graphics library API. The application must re-issue all drawing commands required to describe the entire scene each time a new frame is required, regardless of actual changes. This method provides on the one hand a maximum of control and flexibility to the application program, but on the other hand it also generates continuous work load on the CPU.Examples of immediate mode rendering systems include Direct2D, OpenGL
and Quartz. There are some immediate mode GUIs that are particularly suitable when used in conjunction with immediate mode rendering systems.