Retained mode

from Wikipedia, the free encyclopedia

Retained mode (literally translated: stored mode ) is a design pattern in computer graphics for the design of the programming interface (API) in graphics libraries , where

but use extensive diversions to the resources managed - i.e. stored - by the graphics library . This does not preclude the use of double buffering .

The immediate mode is an alternative approach. Historically, retained mode is the predominant style in program libraries for graphical user interfaces (GUI); however, both modes can coexist in one and the same program library and do not necessarily exclude each other in practice.

Overview

Schematic explanation of the saved resource mode of a graphics API

In retained mode, client calls to the graphics library do not cause immediate rendering , but instead update an abstract internal model (typically a list of objects) that is managed in the memory area of the graphics library. This allows the library to optimize the actual rendering along with the processing of related objects.

Some techniques for optimizing rendering are:

An example of coexistence with Immediate Mode in the same graphics library is OpenGL . OpenGL has immediate mode functions that can use previously defined server-side objects (textures, vertex buffers and index buffers , shaders , etc.) without the client sending unchanged data back to the graphics library.

Examples of rendering systems with retained mode are Windows Presentation Foundation , SceneKit in macOS, and PHIGS .

Schematic explanation of the Immediate mode of a graphics API in difference

There is another significant design pattern for the programming interface (API) in graphics libraries - the immediate mode.

See also

Individual evidence

  1. a b c Quinn Radich: Retained Mode Versus Immediate Mode . In: Win32 apps . Microsoft. May 30, 2018. Retrieved December 21, 2019.
  2. Alex Feldmeier: GUI Programming . In: UWP Computer Science and Software Engineering Technical Report . October 12, 2013. Retrieved December 22, 2019: “Retained mode has been the standard for years. Just about every GUI is in retained mode. "
  3. OpenGL double buffering . Retrieved May 7, 2020.
  4. DirectX double buffering . Retrieved May 7, 2020.
  5. OpenGL face culling . Retrieved May 7, 2020.
  6. DirectX occlusion culling . Retrieved May 7, 2020.
  7. OpenGL . Retrieved May 4, 2020.
  8. Marcel Weiher: iOS and macOS Performance Tuning: Cocoa, Cocoa Touch, Objective-C, and Swift . Addison-Wesley Professional, Feb 24, 2017, ISBN 9780133085532 (Retrieved 22 December 2019): "SceneKit and SpriteKit on the other hand are retained-mode APIs"