diff options
author | Sami Varanka <sami.varanka@qt.io> | 2021-06-02 13:43:06 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-04 10:49:11 +0000 |
commit | 40c40b8e133c4ee3feb199753c82d4b55a105c8e (patch) | |
tree | b039e77a8e74a0240c604db95b82dbcb59d4c8a5 /examples/datavisualization/qml3doscilloscope | |
parent | fbe6278be8875f45f373b958d897a04124dd2c77 (diff) |
Fix direct rendering doesn't show anything
Rendering a graph directly to background didn't
work in Qt 6 since it uses RHI and there is
no way to not clear the color buffer
before rendering. The graph uses direct OpenGL
calls to render directly to background. Enabled
direct rendering to qml3doscilloscope example.
In addition, RenderDirectToBackground_NoClear got
deprecated.
When rendering directly to background,
using non-transparent qml item as a background
will hide the graph. This was already mentioned
in the documentation but not clearly enough.
Updated documentation for AbstractGraph3D.
Fixes: QTBUG-90665
Change-Id: I53081bac382ab89573359886e4f5c4b41be8e86d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit ad85513d4b38bdedac27a095bd3a988f1eda23a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/datavisualization/qml3doscilloscope')
-rw-r--r-- | examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc | 2 | ||||
-rw-r--r-- | examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc b/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc index 3772df32..a3b2f3f3 100644 --- a/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc +++ b/examples/datavisualization/qml3doscilloscope/doc/src/qml3doscilloscope.qdoc @@ -110,7 +110,6 @@ \snippet qml3doscilloscope/qml/qml3doscilloscope/main.qml 3 - \omit \section1 Enabling Direct Rendering Since this application potentially deals with a lot of rapidly changing data, we use direct @@ -122,6 +121,5 @@ \snippet qml3doscilloscope/main.cpp 1 \dots 0 \snippet qml3doscilloscope/main.cpp 2 - \endomit */ diff --git a/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml b/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml index ba733c21..51eba416 100644 --- a/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml +++ b/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml @@ -74,6 +74,7 @@ Item { axisY.segmentCount: 4 axisZ.segmentCount: 4 measureFps: true + renderingMode: AbstractGraph3D.RenderDirectToBackground onCurrentFpsChanged: (fps)=> { if (fps > 10) |