summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuan José Casafranca <juan.casafranca@kdab.com>2020-11-05 13:08:17 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-05 21:11:35 +0000
commita8a212ebbd82bad183aff0bc53d851c66c7fd225 (patch)
treef7295d3b45f95c939b97c6329ff18a6e65bab28f /src
parent46f6e8f9521fa8a3e94b000be16862ace30b65b9 (diff)
Add mipmaps count to QAbstracTexturePrivate
Change-Id: Iaec05eb3d7d8647af14d2e155673dd25c3dae994 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 0fa4099b4fde67e381564509e17892965c53b779) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/render/texture/qabstracttexture.cpp1
-rw-r--r--src/render/texture/qabstracttexture_p.h1
-rw-r--r--src/render/texture/texture.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/render/texture/qabstracttexture.cpp b/src/render/texture/qabstracttexture.cpp
index 2a955c5d8..364cd4bb6 100644
--- a/src/render/texture/qabstracttexture.cpp
+++ b/src/render/texture/qabstracttexture.cpp
@@ -66,6 +66,7 @@ QAbstractTexturePrivate::QAbstractTexturePrivate()
, m_comparisonMode(QAbstractTexture::CompareNone)
, m_layers(1)
, m_samples(1)
+ , m_mipmapLevels(1)
, m_sharedTextureId(-1)
, m_handleType(QAbstractTexture::NoHandle)
, m_handle(QVariant())
diff --git a/src/render/texture/qabstracttexture_p.h b/src/render/texture/qabstracttexture_p.h
index 5b2945f73..d663ce51a 100644
--- a/src/render/texture/qabstracttexture_p.h
+++ b/src/render/texture/qabstracttexture_p.h
@@ -87,6 +87,7 @@ public :
QVector<QAbstractTextureImage *> m_textureImages;
int m_layers;
int m_samples;
+ int m_mipmapLevels;
int m_sharedTextureId;
diff --git a/src/render/texture/texture.cpp b/src/render/texture/texture.cpp
index dab037568..2bed15f32 100644
--- a/src/render/texture/texture.cpp
+++ b/src/render/texture/texture.cpp
@@ -127,6 +127,7 @@ void Texture::syncFromFrontEnd(const QNode *frontEnd, bool firstTime)
p.generateMipMaps = node->generateMipMaps();
p.layers = node->layers();
p.samples = node->samples();
+ p.mipLevels = static_cast<const QAbstractTexturePrivate*>(QAbstractTexturePrivate::get(node))->m_mipmapLevels;
if (p != m_properties) {
m_properties = p;
addDirtyFlag(DirtyProperties);