diff options
author | Kristoffer Skau <kristoffer.skau@qt.io> | 2022-11-24 14:31:09 +0100 |
---|---|---|
committer | Kristoffer Skau <kristoffer.skau@qt.io> | 2022-12-01 13:42:07 +0100 |
commit | c450f6d21c5153e05bd10afdd54767623cfbe7e8 (patch) | |
tree | e7ce6d73cda2f0f83673cad8b528bb67463e9cdd /src/widgets/graphicsview/qgraphicsview_p.h | |
parent | 9bc74d14f379ad58d7a80d5514a3db5be5012de0 (diff) |
Support stereoscopic rendering with QGraphicsView
This patch adds a manual test and the required work in graphicsview and
qwidget private apis to support stereoscopic rendeing. Basically it
works by doing the drawing in QGraphicsView::paintEvent twice, once for
each buffer. This way the scene items are rendered to both buffers.
There's also an update to resolvement in QOpenGLWidgetPrivate
so that multisampling works correctly.
[ChangeLog][Widgets][QGraphicsView] Added support for
stereoscopic rendering.
Task-number: QTBUG-64587
Change-Id: I20650682daa805b64fe7f0d2ba086917d3f12229
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview_p.h')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview_p.h b/src/widgets/graphicsview/qgraphicsview_p.h index f3388764b5..a15defe621 100644 --- a/src/widgets/graphicsview/qgraphicsview_p.h +++ b/src/widgets/graphicsview/qgraphicsview_p.h @@ -100,6 +100,8 @@ public: QGraphicsView::ViewportUpdateMode viewportUpdateMode; QGraphicsView::OptimizationFlags optimizationFlags; + bool stereoEnabled = false; // Set in setupViewport() + QPointer<QGraphicsScene> scene; #if QT_CONFIG(rubberband) QRect rubberBandRect; |