diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-06-20 15:45:54 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-06-20 16:34:07 +0300 |
commit | 74e1374b246f0b6d8c4560f052b9f880c41603ab (patch) | |
tree | 6d2556df3f2ec0e8c5edb1c81557d7aa62705e57 /src/api/studio3d/q3dscommandqueue.cpp | |
parent | 46a1400d950a735d85fb061b1d7264f1f8d3c542 (diff) |
Add matteEnabled to viewer settings
The flag is required to disable clearing to black in qml applications,
which support transparency.
Task-number: QT3DS-3689
Task-number: QT3DS-3542
Change-Id: I27b1e07a394be30f0fb4841c69555dde5697a5cf
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Jari Karppinen <jari.karppinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Diffstat (limited to 'src/api/studio3d/q3dscommandqueue.cpp')
-rw-r--r-- | src/api/studio3d/q3dscommandqueue.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/studio3d/q3dscommandqueue.cpp b/src/api/studio3d/q3dscommandqueue.cpp index c6071aa..e9eed29 100644 --- a/src/api/studio3d/q3dscommandqueue.cpp +++ b/src/api/studio3d/q3dscommandqueue.cpp @@ -61,6 +61,7 @@ CommandQueue::CommandQueue() , m_showRenderStats(false) , m_matteColor(Qt::black) , m_delayedLoading(false) + , m_matteEnabled(false) , m_size(0) { qRegisterMetaType<CommandType>(); @@ -207,6 +208,7 @@ void CommandQueue::copyCommands(CommandQueue &fromQueue) m_globalAnimationTimeChanged = m_globalAnimationTimeChanged || fromQueue.m_globalAnimationTimeChanged; m_delayedLoadingChanged = m_delayedLoadingChanged || fromQueue.m_delayedLoadingChanged; + m_matteEnabledChanged = m_matteEnabledChanged || fromQueue.m_matteEnabledChanged; if (fromQueue.m_visibleChanged) m_visible = fromQueue.m_visible; @@ -226,6 +228,8 @@ void CommandQueue::copyCommands(CommandQueue &fromQueue) m_globalAnimationTime = fromQueue.m_globalAnimationTime; if (fromQueue.m_delayedLoadingChanged) m_delayedLoading = fromQueue.m_delayedLoading; + if (fromQueue.m_matteEnabledChanged) + m_matteEnabled = fromQueue.m_matteEnabled; // Pending queue may be synchronized multiple times between queue processing, so let's append // to the existing queue rather than clearing it. @@ -304,6 +308,7 @@ void CommandQueue::clear(bool deleteCommandData) m_variantListChanged = false; m_globalAnimationTimeChanged = false; m_delayedLoadingChanged = false; + m_matteEnabledChanged = false; if (deleteCommandData) { for (int i = 0; i < m_size; ++i) { |