Retained mode

Retained mode in computer graphics is a major pattern of API design in graphics libraries, in which

Immediate mode is an alternative approach. Historically, retained mode has been the dominant style in GUI libraries[2]; however, both can coexist in the same library and are not necessarily exclusionary in practice.

Overview

Schematic explanation of a retained mode graphics API

In retained mode the client calls do not directly cause actual rendering, but instead updates an abstract internal model (typically a list of objects) which is maintained within the library's data space. This allows the library to optimize when actual rendering takes place along with the processing of related objects.[1]

Some techniques to optimize rendering include:

Example of coexistence with immediate mode in the same library is OpenGL.[7] OpenGL has immediate mode functions that can use previously defined server side objects (textures, vertex buffers and index buffers, shaders, etc.) without resending unchanged data.

Examples of retained mode rendering systems include Windows Presentation Foundation,[1] SceneKit on macOS,[8] and PHIGS.

Schematic explanation of an immediate mode graphics API in contrast

There is another major pattern of API design in graphics libraries  the Immediate mode.

gollark: "You can't judge me for a thing because of some information about it I'm not giving you" ← no.
gollark: Well, you've shown that you're willing to do rather bad things for bad reasons.
gollark: Purposes.
gollark: Or probably won't.
gollark: Inasmuch as it won't actually change your behaviour, yes.

See also

References

  1. Quinn Radich (May 30, 2018). "Retained Mode Versus Immediate Mode". Win32 apps. Microsoft. Retrieved 21 December 2019.
  2. Feldmeier, Alex (October 12, 2013). "GUI Programming". UWP Computer Science and Software Engineering Technical Report. Retrieved 22 December 2019. Retained mode has been the standard for years. Just about every GUI is in retained mode.
  3. "OpenGL double buffering". Retrieved 7 May 2020.
  4. "DirectX double buffering". Retrieved 7 May 2020.
  5. "OpenGL face culling". Retrieved 7 May 2020.
  6. "DirectX occlusion culling". Retrieved 7 May 2020.
  7. "OpenGL". Retrieved 4 May 2020.
  8. 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. SceneKit and SpriteKit on the other hand are retained-mode APIs
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.