aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-05 18:10:30 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-09 21:13:21 +0200
commit22d8db1e115b120ce2f62896eb7fea452348941e (patch)
treebeb189edc62ce1a5bee433827415f0dd95fe7272 /src/quick/items/qquickwindow_p.h
parent84b53c165e9d492a547c04499450007d2c293bc8 (diff)
Add perspective 3D plane render mode
One can now do rc->createRenderer(QSGRenderContext::RenderMode3D) in Quick3D. By default nothing changes, both QQuickWindow and QSGRhiLayer default to either RenderMode2D or RenderMode2DNoDepthBuffer, depending on QSG_NO_DEPTH_BUFFER. (the environment variable handling is moved out of qsgbatchrenderer.cpp however, leaving it up to whoever is creating the renderer to passing the appropriate flag) The RenderMode3D mode is a modified version of the QSG_NO_DEPTH_BUFFER case: only alpha batches are used, which are then rendered back to front. The difference is that this is done with depth test on (no write), so the 2D content gets depth tested against whatever is already in the depth buffer. Then, there's an additional depth "post pass" to fill the depth buffer with the 2D content. This must be separate from the color-write enabled stage because otherwise unavoidable Z fighting would occur. By filling the depth buffer, other 3D or 2D content, that is rendered afterwards, can depth test correctly against the 2D elements rendered here. customRenderMode and related functions are renamed to visualization (because that's what it is about), in order to prevent confusing name clashes. Change-Id: I0d43b273e0a8020af05a652a236c0ad5fb150685 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r--src/quick/items/qquickwindow_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index c1a49b69ff..9adbdeec51 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -262,7 +262,7 @@ public:
QSGRenderContext *context;
QSGRenderer *renderer;
- QByteArray customRenderMode; // Default renderer supports "clip", "overdraw", "changes", "batches" and blank.
+ QByteArray visualizationMode; // Default renderer supports "clip", "overdraw", "changes", "batches" and blank.
QSGRenderLoop *windowManager;
QQuickRenderControl *renderControl;