Immediate mode in computer graphics is a design pattern of
API design in graphics libraries, in which
* the
client calls directly cause
rendering of graphics objects to the display, or in which
* the data to describe
rendering primitive
This is a glossary of terms relating to computer graphics.
For more general computer hardware terms, see glossary of computer hardware terms.
0–9
A
B
...
s is inserted
frame by frame directly from the
client into a
command list
This is a glossary of terms relating to computer graphics.
For more general computer hardware terms, see glossary of computer hardware terms.
0–9
A
B
...
(in the case of ''
immediate mode primitive rendering''),
without the use of extensive indirection – thus'' immediate ''– to retained resources.
It does not preclude the use of
double-buffering.
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 (complete
object model of the
rendering primitive
This is a glossary of terms relating to computer graphics.
For more general computer hardware terms, see glossary of computer hardware terms.
0–9
A
B
...
s) 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
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
.

Examples of immediate mode rendering systems include
Direct2D,
[ ]OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve ha ...
and Quartz
Quartz is a hard, crystalline mineral composed of silica ( silicon dioxide). The atoms are linked in a continuous framework of SiO4 silicon-oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall chemical ...
. There are some immediate mode GUIs that are particularly suitable when used in conjunction with immediate mode rendering systems.
Immediate mode primitive rendering
Primitive vertex attribute data may be inserted frame by frame into a command buffer by a rendering API. This involves significant bandwidth and processor time (especially if the graphics processing unit
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mo ...
is on a separate bus), but may be advantageous for data generated dynamically by the CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
. It is less common since the advent of increasingly versatile shaders, with which a graphics processing unit
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mo ...
may generate increasingly complex effects without the need for CPU intervention.
Immediate mode rendering with vertex buffers
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
In computer programming, indirection (also called dereferencing) is the ability to reference something using a name, reference, or container instead of the value itself. The most common form of indirection is the act of manipulating a value throug ...
) (e.g. textures and vertex buffers) in the drawing commands.
See also
* Immediate mode GUI
* Display list
* Retained mode, usually contrasted with immediate mode
* Scene graph
References
{{Reflist
Computer graphics
OpenGL
DirectX