QOpenGLCompositor Class

A generic OpenGL-based compositor \since 5.4 \internal \ingroup qpa. More...

Header: #include <QOpenGLCompositor>
Inherits: QObject

Detailed Description

This class provides a lightweight compositor that maintains the basic stacking order of windows and composites them by drawing textured quads via OpenGL.

It it meant to be used by platform plugins that run without a windowing system.

It is up to the platform plugin to manage the lifetime of the compositor (instance(), destroy()), set the correct destination context and window as early as possible (setTarget()), register the composited windows as they are shown, activated, raised and lowered (addWindow(), moveToTop(), etc.), and to schedule repaints (update()).

Note: To get support for QWidget-based windows, just use QOpenGLCompositorBackingStore. It will automatically create textures from the raster-rendered content and trigger the necessary repaints.