Retained mode

Last updated

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

Contents

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

Overview

Schematic explanation of a retained mode graphics API Retail-mode-graphics-api.png
Schematic explanation of a retained mode graphics API

In retained mode the client calls do not directly cause actual rendering, but instead update 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. [2]

Some techniques to optimize rendering include:

Example of coexistence with immediate mode in the same library is OpenGL.[ dubious ][ failed verification ] [10] 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. [11] [12]

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

Schematic explanation of an immediate mode graphics API in contrast Immediate-mode-graphics-api.png
Schematic explanation of an immediate mode graphics API in contrast

See also

Related Research Articles

<span class="mw-page-title-main">OpenGL</span> Cross-platform graphics API

OpenGL 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 hardware-accelerated rendering.

OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep was principally developed by NeXT with Sun Microsystems, to allow advanced application development on Sun's operating systems, specifically Solaris. NeXT produced a version of OpenStep for its own Mach-based Unix, stylized as OPENSTEP, as well as a version for Windows NT. The software libraries that shipped with OPENSTEP are a superset of the original OpenStep specification, including many features from the original NeXTSTEP.

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

<span class="mw-page-title-main">GNUstep</span> Open source widget toolkit and application development tools

GNUstep is a free software implementation of the Cocoa Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project.

Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware acceleration if it is available on the graphics card, allowing for hardware acceleration of the entire 3D rendering pipeline or even only partial acceleration. Direct3D exposes the advanced graphics capabilities of 3D graphics hardware, including Z-buffering, W-buffering, stencil buffering, spatial anti-aliasing, alpha blending, color blending, mipmapping, texture blending, clipping, culling, atmospheric effects, perspective-correct texture mapping, programmable HLSL shaders and effects. Integration with other DirectX technologies enables Direct3D to deliver such features as video mapping, hardware 3D rendering in 2D overlay planes, and even sprites, providing the use of 2D and 3D graphics in interactive media ties.

<span class="mw-page-title-main">Windowing system</span> Software that manages separately different parts of display screens

In computing, a windowing system is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP paradigm for a user interface.

Fahrenheit was an effort to create a unified high-level API for 3D computer graphics to unify Direct3D and OpenGL. It was designed primarily by Microsoft and SGI and also included work from an HP-MS joint effort.

<span class="mw-page-title-main">Hidden-surface determination</span> Visibility in 3D computer graphics

In 3D computer graphics, hidden-surface determination is the process of identifying what surfaces and parts of surfaces can be seen from a particular viewing angle. A hidden-surface determination algorithm is a solution to the visibility problem, which was one of the first major problems in the field of 3D computer graphics. The process of hidden-surface determination is sometimes called hiding, and such an algorithm is sometimes called a hider. When referring to line rendering it is known as hidden-line removal. Hidden-surface determination is necessary to render a scene correctly, so that one may not view features hidden behind the model itself, allowing only the naturally viewable portion of the graphic to be visible.

<span class="mw-page-title-main">QuickDraw 3D</span> 3D graphics API developed by Apple Inc.

QuickDraw 3D, or QD3D for short, is a 3D graphics API developed by Apple Inc. starting in 1995, originally for their Macintosh computers, but delivered as a cross-platform system.

Direct3D and OpenGL are competing application programming interfaces (APIs) which can be used in applications to render 2D and 3D computer graphics. As of 2005, graphics processing units (GPUs) almost always implement one version of both of these APIs. Examples include: DirectX 9 and OpenGL 2 circa 2004; DirectX 10 and OpenGL 3 circa 2008; and most recently, DirectX 11 and OpenGL 4 circa 2011. GPUs that support more recent versions of the standards are backwards compatible with applications that use the older standards; for example, one can run older DirectX 9 games on a more recent DirectX 11-certified GPU.

<span class="mw-page-title-main">OpenGL ES</span> Subset of the OpenGL API for embedded systems

OpenGL for Embedded Systems is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accelerated using a graphics processing unit (GPU). It is designed for embedded systems like smartphones, tablet computers, video game consoles and PDAs. OpenGL ES is the "most widely deployed 3D graphics API in history".

<span class="mw-page-title-main">OpenSceneGraph</span>

OpenSceneGraph is an open-source 3D graphics application programming interface, used by application developers in fields such as visual simulation, computer games, virtual reality, scientific visualization and modeling.

Clipping, in the context of computer graphics, is a method to selectively enable or disable rendering operations within a defined region of interest. Mathematically, clipping can be described using the terminology of constructive geometry. A rendering algorithm only draws pixels in the intersection between the clip region and the scene model. Lines and surfaces outside the view volume are removed.

Core OpenGL, or CGL, is Apple Inc.'s Macintosh Quartz windowing system interface to the OS X implementation of the OpenGL specification. CGL is analogous to GLX, which is the X11 interface to OpenGL, as well as WGL, which is the Microsoft Windows interface to OpenGL.

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

Coin3D is a free and open-source implementation (library) of the Open Inventor API. Coin3D was originally developed and maintained as commercial software by the Norwegian company Kongsberg Oil & Gas Technologies. Coin3D, like Open Inventor, is a C++ object oriented retained mode 3D graphics API used to provide a higher layer of programming for OpenGL. The API provides a number of common graphics rendering constructs to developers such as scene graphs to accomplish this. Coin3D is fully compatible with the Open Inventor API version 2.1. Coin3D can be used to drive advanced visualization solutions in a wide range of application domains such as geo-modelling, CAD, medical visualization, robotics and presentation.

Visualization Library (VL) is an open source C++ middleware for 2D/3D graphics applications based on OpenGL 4, designed to develop portable applications for the Microsoft Windows, Linux and Mac OS X operating systems.

This is a glossary of terms relating to computer graphics.

<span class="mw-page-title-main">Immediate mode GUI</span>

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 the retained mode.

References

  1. Jin, Zhefan (May 2006). "Retained-Mode Parallel Graphics Rendering For Cooperative Design Environments". 2006 10th International Conference on Computer Supported Cooperative Work in Design: 1–6. doi:10.1109/CSCWD.2006.253142. ISBN   1-4244-0164-X. S2CID   5825966.
  2. 1 2 3 Quinn Radich (May 30, 2018). "Retained Mode Versus Immediate Mode". Win32 apps. Microsoft. Retrieved 21 December 2019.
  3. stevewhims. "Predication queries - Win32 apps". learn.microsoft.com. Retrieved 2022-12-09.
  4. 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.
  5. QuinnRadich. "Retained Mode Versus Immediate Mode - Win32 apps". docs.microsoft.com. Retrieved 2020-08-21.
  6. "OpenGL double buffering" . Retrieved 7 May 2020.
  7. "DirectX double buffering" . Retrieved 7 May 2020.
  8. "OpenGL face culling" . Retrieved 7 May 2020.
  9. "DirectX occlusion culling" . Retrieved 7 May 2020.
  10. "OpenGL" . Retrieved 4 May 2020.
  11. "OpenGL Driver Support". NVIDIA Developer. 2013-08-19. Retrieved 2020-08-21.
  12. "OpenGL - The Industry's Foundation for High Performance Graphics". The Khronos Group. 2011-07-19. Retrieved 2020-08-21.
  13. 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