summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
diff options
context:
space:
mode:
authorSami Varanka <sami.varanka@qt.io>2021-06-02 13:43:06 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-04 10:49:11 +0000
commit40c40b8e133c4ee3feb199753c82d4b55a105c8e (patch)
treeb039e77a8e74a0240c604db95b82dbcb59d4c8a5 /src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
parentfbe6278be8875f45f373b958d897a04124dd2c77 (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 'src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc')
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
index bc68d2fb..df2143a3 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
@@ -89,26 +89,19 @@
How the graph will be rendered. Defaults to \c{RenderIndirect}.
\value RenderDirectToBackground
- Indicates that the graph will be rendered directly on the window background.
+ Indicates that the graph will be rendered directly on the window background and QML items are
+ rendered on top of it. Using non-transparent QML item as a background will hide the graph.
Clears the whole window before rendering the graph, including the areas
- outside the graph.
- Since the graphs in this rendering mode are drawn on the window background under other QML
- items, the regular QML window clearing before rendering is suppressed. The graphs handle the clearing
- themselves instead.
- If the surface format of the window supports antialiasing, it will be used (see
- \c {qDefaultSurfaceFormat()}).
+ outside the graph. If the surface format of the window supports antialiasing, it will be used (see
+ \c {QtDataVisualization::qDefaultSurfaceFormat()}).
This rendering mode offers the best performance at the expense of non-standard QML behavior. For example,
the graphs do not obey the z ordering of QML items and the opacity value has no effect on them.
+
\value RenderDirectToBackground_NoClear
- Similar to \c RenderDirectToBackground mode, except that the graph will not clear the whole
- window before rendering the graph. This mode is better for windows where you have other custom items
- besides the graphs that also draw on the window background. In that case you need to either take care
- of the window clearing yourself or ensure that all areas of the window are fully covered with opaque
- items.
- If one graph in the window uses either of the direct rendering modes, then all other graphs in the
- same window also drawn in direct modes should use the exact same direct rendering mode.
- Otherwise some graphs may not show up, depending on the drawing order of the graphs.
+ \obsolete
+ \note This will work exactly the same way as \c RenderDirectToBackground does in Qt 6
+ as not clearing the window is not supported anymore.
\value RenderIndirect
Indicates the graph will be first rendered to an offscreen surface that