summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSApplication.cpp
diff options
context:
space:
mode:
authorAntti Kokko <antti.kokko@qt.io>2020-04-16 09:45:05 +0300
committerAntti Kokko <antti.kokko@qt.io>2020-04-16 09:45:42 +0300
commit4cebb63cc080f53e2e52da68920b4f9bc95e609d (patch)
tree246b3bfcd578a7f4a0e27f2df0f137c49a499bd5 /src/runtime/Qt3DSApplication.cpp
parentf07a25c618432e08a145d714781b52c534a694da (diff)
parent02e4d56d055d73340d3af1257b908a52aecc320f (diff)
Merge branch 'master' into 2.7
Diffstat (limited to 'src/runtime/Qt3DSApplication.cpp')
-rw-r--r--src/runtime/Qt3DSApplication.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index 1abc903..f7f8b46 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -638,6 +638,7 @@ struct SApp : public IApplication
bool m_DisableState;
bool m_ProfileLogging;
bool m_LastRenderWasDirty;
+ bool m_ProgressiveLeftFrame;
QT3DSU64 m_LastFrameStartTime;
QT3DSU64 m_ThisFrameStartTime;
double m_MillisecondsSinceLastFrame;
@@ -688,6 +689,7 @@ struct SApp : public IApplication
, m_DisableState(true)
, m_ProfileLogging(false)
, m_LastRenderWasDirty(true)
+ , m_ProgressiveLeftFrame(true)
, m_LastFrameStartTime(0)
, m_ThisFrameStartTime(0)
, m_MillisecondsSinceLastFrame(0)
@@ -1098,12 +1100,17 @@ struct SApp : public IApplication
.RenderPresentation(pres, m_initialFrame);
} else {
// In stereoscopic mode, render 2 times for left & right eye
- rc.SetStereoView(StereoViews::Left);
- m_LastRenderWasDirty = m_RuntimeFactory->GetSceneManager()
- .RenderPresentation(pres, m_initialFrame);
- rc.SetStereoView(StereoViews::Right);
- m_RuntimeFactory->GetSceneManager()
- .RenderPresentation(pres, m_initialFrame);
+ if (!rc.GetStereoProgressiveEnabled() || m_ProgressiveLeftFrame) {
+ rc.SetStereoView(StereoViews::Left);
+ m_LastRenderWasDirty = m_RuntimeFactory->GetSceneManager()
+ .RenderPresentation(pres, m_initialFrame);
+ }
+ if (!rc.GetStereoProgressiveEnabled() || !m_ProgressiveLeftFrame) {
+ rc.SetStereoView(StereoViews::Right);
+ m_RuntimeFactory->GetSceneManager()
+ .RenderPresentation(pres, m_initialFrame);
+ }
+ m_ProgressiveLeftFrame = !m_ProgressiveLeftFrame;
}
m_initialFrame = false;