QSGAbstractRenderer Class
QSGAbstractRenderer gives access to the scene graph nodes and rendering of a QSGEngine. More...
| Header: | #include <QSGAbstractRenderer> |
| qmake: | QT += quick |
| Since: | Qt 5.4 |
| Inherits: | QObject |
This class was introduced in Qt 5.4.
Public Types
| enum | ClearModeBit { ClearColorBuffer, ClearDepthBuffer, ClearStencilBuffer } |
| enum | MatrixTransformFlag { MatrixTransformFlipY } |
Detailed Description
A QSGAbstractRenderer created by a QSGEngine allows you to set your QSGNode tree through setRootNode() and control the rendering viewport through setDeviceRect(), setViewportRect() and setProjectionMatrixToRect(). You can finally trigger the rendering to the desired framebuffer through renderScene().
The QSGAbstractRenderer is only available when used with a QSGEngine and isn't exposed when used internally by QQuickWindow.
See also QSGEngine and QSGNode.
Member Type Documentation
enum QSGAbstractRenderer::ClearModeBit
Used with setClearMode() to indicate which buffer should be cleared before the scene render.
| Constant | Value | Description |
|---|---|---|
QSGAbstractRenderer::ClearColorBuffer | 0x0001 | Clear the color buffer using clearColor(). |
QSGAbstractRenderer::ClearDepthBuffer | 0x0002 | Clear the depth buffer. |
QSGAbstractRenderer::ClearStencilBuffer | 0x0004 | Clear the stencil buffer. |
See also setClearMode() and setClearColor().
enum QSGAbstractRenderer::MatrixTransformFlag
Used with setProjectionMatrixToRect() to indicate the expectations towards the generated projection matrix.
| Constant | Value | Description |
|---|---|---|
QSGAbstractRenderer::MatrixTransformFlipY | 0x01 | The traditional assumption in Qt Quick is that Y points up in the normalized device coordinate system. There is at least one modern graphics API where this is not the case (Vulkan). This flag can then be used to get a projection that is appropriate for such an API. |
This enum was introduced or modified in Qt 5.14.
See also setProjectionMatrixToRect().