Jump to content

Immediate mode (computer graphics)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Voidvector (talk | contribs) at 08:40, 22 December 2019 (fix publisher). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Immediate mode in computer graphics is a style of API design in graphics libraries, in which 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 into a command list (in the case of immediate mode primitive rendering), without the use of extensive indirection to retained resources.[1] It does not preclude the use of double-buffering. In contrast to retained mode, lists of objects to be rendered are not saved by the API library. Instead, 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 the maximum amount of control and flexibility to the application program.

Examples of immediate mode rendering systems include Direct2D[1], OpenGL, and Quartz.[2]

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 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, with which a graphics processing unit 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) (e.g. textures and vertex buffers) in the drawing commands.

See also

References

  1. ^ a b Quinn Radich (May 30, 2018). "Retained Mode Versus Immediate Mode". Win32 apps. Microsoft. Retrieved 21 December 2019.
  2. ^ Weiher, Marcel (Feb 24, 2017). iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift. Addison-Wesley Professional. ISBN 9780133085532. Retrieved 22 December 2019. The primary graphics API Quartz and OpenGL are both immediate-mode APIs