summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dsuippresentation_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-08-06 13:29:32 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-08-14 19:51:45 +0000
commitf2dac6a0b0c4be1a95dca352a72844f649b934e4 (patch)
tree8ee864015c4f1112cb4173c602b693b9ca4701e8 /src/runtime/q3dsuippresentation_p.h
parentf9facdf889dd4d040aa2a48d177c728c626813b8 (diff)
Add an optional separated engine-view mode to Studio3D
Adding View3D items to the Qt Quick scene allows turning off layer composition in the main presentation, and instead accessing each layer's texture as an individual visual QQuickItem. This way the 3D layers can be placed anywhere and be blended freely in the 2D scene, while avoiding all the trouble multiple Studio3D items would cause. This also moves composition into the Qt Quick domain, providing a more sensible story for creating 2D-3D UIs. While post-processing effects are still active even in separated views mode, it is now possible to use ShaderEffect instead. MSAA and SSAA layers are not handled currently and are left as a future exercise for those who like mind-boggling complexity. Task-number: QT3DS-2032 Change-Id: I08128b65d0344c609f8dea15f9562ccfd19140a6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/runtime/q3dsuippresentation_p.h')
-rw-r--r--src/runtime/q3dsuippresentation_p.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/runtime/q3dsuippresentation_p.h b/src/runtime/q3dsuippresentation_p.h
index 53bb31c..f7838f7 100644
--- a/src/runtime/q3dsuippresentation_p.h
+++ b/src/runtime/q3dsuippresentation_p.h
@@ -1000,7 +1000,10 @@ public:
DisableDepthTest = 0x01,
DisableDepthPrePass = 0x02,
TemporalAA = 0x04,
- FastIBL = 0x08
+ FastIBL = 0x08,
+
+ // non-uip
+ ExplicitSize = 0x1000
};
Q_DECLARE_FLAGS(Flags, Flag)
@@ -1072,6 +1075,11 @@ public:
void resolveReferences(Q3DSUipPresentation &pres) override;
int mapChangeFlags(const Q3DSPropertyChangeList &changeList) override;
+ // non-uip, for internal use
+ bool hasExplicitSize() const { return m_layerFlags.testFlag(ExplicitSize); }
+ QSize explicitSize() const { return m_explicitSize; }
+ Q3DSPropertyChange setExplicitSize(bool enabled, const QSize &size = QSize());
+
// Properties
Flags layerFlags() const { return m_layerFlags; }
bool depthTestDisabled() const { return m_layerFlags.testFlag(DisableDepthTest); }
@@ -1168,6 +1176,8 @@ private:
Q_DISABLE_COPY(Q3DSLayerNode)
template<typename V> void setProps(const V &attrs, PropSetFlags flags);
+ QSize m_explicitSize;
+
Flags m_layerFlags = FastIBL;
ProgressiveAA m_progressiveAA = NoPAA;
MultisampleAA m_multisampleAA = NoMSAA;