diff options
author | Laszlo Agocs <[email protected]> | 2022-03-11 20:03:57 +0100 |
---|---|---|
committer | Laszlo Agocs <[email protected]> | 2022-03-18 22:56:54 +0100 |
commit | 8308f9f443cabd63786738be25f630d537a84c20 (patch) | |
tree | a88d37eac6dff99595b990975497e69ede2afe11 /src/quick/scenegraph/adaptations/software | |
parent | a184f2e0abfa0daf9190b72901208373dd5c1f79 (diff) |
Port QQuickShaderEffectSource format to Qt 6
The values there are ignored completely starting with Qt 6.0, the actual
texture format is always RGBA8.
Keep the existing values so that existing QML code still works, but
document that some of these do not do what the name would imply.
Introduce properly named values, including the floating point formats in
addition to RGBA8; these are actually useful as they allow doing high
dynamic range rendering, and, more importantly, the same format enum
can now be used by Quick3D's View3D as well, thus sharing one common way
to configure the backing texture for all three of ShaderEffect(Source),
Item.layer, and View3D.
[ChangeLog][QtQuick][ShaderEffect] ShaderEffect and Item layers can now
request using a floating point texture format for their backing texture.
ShaderEffectSource::format has been revised with values that have an
actual effect on the underlying texture.
Change-Id: I1d06d5541aeb943517e93c925b1b3ef2996a0b26
Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp index 171485d678..0e6fa9b3ec 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp @@ -160,7 +160,7 @@ void QSGSoftwareLayer::setRecursive(bool recursive) m_recursive = recursive; } -void QSGSoftwareLayer::setFormat(uint) +void QSGSoftwareLayer::setFormat(Format) { } diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h index 387e6e9eb8..110c502404 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h @@ -88,7 +88,7 @@ public: QImage toImage() const override; void setLive(bool live) override; void setRecursive(bool recursive) override; - void setFormat(uint) override; + void setFormat(Format) override; void setHasMipmaps(bool) override; void setDevicePixelRatio(qreal ratio) override; void setMirrorHorizontal(bool mirror) override; |