HOME

TheInfoList



OR:

Immediate mode in computer graphics is a design pattern of API design in graphics libraries, in which * the
client Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
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 A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
by frame directly from the
client Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
into a command list (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 In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete (though perhaps old) version of the data, rather than a partially updated version of the data being creat ...
.
Retained mode Retained mode in computer graphics is a major pattern of API design in graphics libraries, in which * the graphics library, instead of the client, retains the scene (complete object model of the rendering primitives) to be rendered and * the ...
is an alternative approach. Historically, retained mode has been the dominant style in
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
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 In computing, object model has two related but distinct meanings: # The properties of objects in general in a specific computer programming language, technology, notation or methodology that uses them. Examples are the object models of ''Java'', ...
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 Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
, instead of the
graphics library A graphics library is a program library designed to aid in rendering computer graphics to a monitor. This typically involves providing optimized versions of functions that handle common rendering tasks. This can be done purely in software and runn ...
. This implies that in an immediate mode application the lists of graphical objects to be rendered are kept by the
client Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuabl ...
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 A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
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 Direct2D is a 2D vector graphics application programming interface (API) designed by Microsoft and implemented in Windows 10, Windows 8, Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows Server 2008 (with Platform Update i ...
,
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 hardwa ...
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 form ...
. There are some
immediate mode GUI An immediate mode graphic user interface (GUI), also known as IMGUI, is a graphical user interface design pattern which uses an immediate mode graphics library to create the GUI. The other major pattern of API design in graphics libraries is th ...
s that are particularly suitable when used in conjunction with immediate mode rendering systems.


Immediate mode primitive rendering

Primitive
vertex attribute A vertex (plural vertices) in computer graphics is a data structure that describes certain attributes, like the position of a point in 2D or 3D space, or multiple points on a surface. Application to 3D models 3D models are most often represented ...
data may be inserted
frame A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
by frame into a
command buffer This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms This glossary of computer hardware terms is a list of definitions of terms and concepts related to com ...
by a
rendering API This is a glossary of terms relating to computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and comp ...
. 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, mobi ...
is on a separate bus), but may be advantageous for data generated dynamically by the CPU. It is less common since the advent of increasingly versatile
shaders In computer graphics, a shader is a computer program that calculates the appropriate levels of light, darkness, and color during the Rendering (computer graphics), rendering of a 3D scene - a process known as ''shading''. Shaders have evolved ...
, 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, mobi ...
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 A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
, 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 buffer 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) in the drawing commands.


See also

*
Immediate mode GUI An immediate mode graphic user interface (GUI), also known as IMGUI, is a graphical user interface design pattern which uses an immediate mode graphics library to create the GUI. The other major pattern of API design in graphics libraries is th ...
*
Display list A display list (or ''display file'') is a series of graphics commands that define an output image. The image is created ( ''rendered'') by executing the commands to combine various primitives. This activity is most often performed by specialized di ...
*
Retained mode Retained mode in computer graphics is a major pattern of API design in graphics libraries, in which * the graphics library, instead of the client, retains the scene (complete object model of the rendering primitives) to be rendered and * the ...
, usually contrasted with immediate mode *
Scene graph Scene (from Greek σκηνή ''skēnḗ'') may refer to: Arts, entertainment, and media Music *Scene (subculture), a youth subculture from the early 2000s characterized by a distinct music and style. Groups and performers * The Scene who recor ...


References

{{Reflist Computer graphics OpenGL DirectX