Retained mode
Template:Short description Template:More citations needed
Retained mode in computer graphics is a major pattern of API design in graphics libraries,[1] in which
- the graphics library, instead of the client, retains the scene (complete object model of the rendering primitives) to be rendered and
- the client calls into the graphics library do not directly cause actual rendering, but make use of extensive indirection to resources, managedTemplate:Snd thus retainedTemplate:Snd by the graphics library.[2] It does not preclude the use of double-buffering.[3]
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
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:
- managing double buffering[6][7]
- treatment of hidden surfaces by backface culling[8]/occlusion culling (Z-buffering)[9]
- only transferring data that has changed from one frame to the next from the application to the library
Example of coexistence with immediate mode in the same library is OpenGL.Script error: No such module "Unsubst".Script error: No such module "Unsubst".[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.
See also
References
- ↑ Script error: No such module "citation/CS1".
- ↑ a b c Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".