diff options
author | Svenn-Arne Dragly <s@dragly.com> | 2019-02-18 21:52:15 +0100 |
---|---|---|
committer | Svenn-Arne Dragly <svenn-arne.dragly@qt.io> | 2019-02-25 14:55:01 +0000 |
commit | d13c01ce0e5e3fd921463c5a99aa21c1be244521 (patch) | |
tree | 398ab040839ac1de14d5ca446c8558d6322861c5 /src | |
parent | 84fcc5c5009a7ea6d02981fadd805602c5b40126 (diff) |
Set the number of faces to one in distance field texture
Otherwise, the backend QTextureImageData uploads an empty QByteArray,
leading to a corrupted texture.
Change-Id: Icdee50c7dd4ec0de89abf89931b611684953c2eb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/q3dsdistancefieldglyphcache.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/q3dsdistancefieldglyphcache.cpp b/src/runtime/q3dsdistancefieldglyphcache.cpp index a4ca621..6086917 100644 --- a/src/runtime/q3dsdistancefieldglyphcache.cpp +++ b/src/runtime/q3dsdistancefieldglyphcache.cpp @@ -87,6 +87,7 @@ namespace { textureData->setHeight(m_image.height()); textureData->setDepth(1); textureData->setLayers(1); + textureData->setFaces(1); textureData->setMipLevels(1); textureData->setFormat(m_isOpenGLES ? QOpenGLTexture::AlphaFormat : QOpenGLTexture::R8_UNorm); textureData->setTarget(QOpenGLTexture::Target2D); |