Retained mode
Retained mode in computer graphics is a major pattern of API design in graphics libraries, in which
- the graphics library, instead of the client, retains the scene 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, managed – thus retained – by the graphics library. It does not preclude the use of double-buffering.
Overview
In retained mode the client calls do not directly cause actual rendering, but instead update an Abstract [data type|abstract internal model] 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.Some techniques to optimize rendering include:
- managing double buffering
- treatment of hidden surfaces by backface culling/occlusion culling
- only transferring data that has changed from one frame to the next from the application to the library
Examples of retained mode rendering systems include Windows Presentation Foundation, SceneKit on macOS, and PHIGS.