diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-09-06 07:42:26 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-09-13 15:12:14 +0300 |
commit | a02fbad9da1fda496eb1aff8d2b8bdf2ef9fbca8 (patch) | |
tree | 9c402400be9153d4e818c493c9a29faffd4ec4bc | |
parent | ec66cdb9aa6161c13ec67653fdfc322f459f77ae (diff) |
Write hasOpaquePixels if image has transparency
- Allows detecting in runtime if we need to use alphatest when rendering
materials, which use this image
Change-Id: Ia7c98d61d672a629cf339b384277bc9ab63bbe2a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Client/Code/Core/Doc/Doc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp index f618a365..ba7e987c 100644 --- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp +++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp @@ -2488,6 +2488,8 @@ void CDoc::SavePresentationFile(CBufferedOutputStream *inOutputStream) theWriter.Att(L"sourcepath", theImageBuffers[idx].first.c_str()); // Writing boolean in wide text results just in "T" or "F" on Linux theWriter.Att("hasTransparency", true); + if (theBuffer.m_TextureFlags.HasOpaquePixels()) + theWriter.Att("hasOpaquePixels", true); } } } |