summaryrefslogtreecommitdiffstats
path: root/src/render/texture/qabstracttexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/texture/qabstracttexture.cpp')
-rw-r--r--src/render/texture/qabstracttexture.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/render/texture/qabstracttexture.cpp b/src/render/texture/qabstracttexture.cpp
index 3cc7177f8..0e8abe090 100644
--- a/src/render/texture/qabstracttexture.cpp
+++ b/src/render/texture/qabstracttexture.cpp
@@ -588,6 +588,15 @@ void QAbstractTexture::setSamples(int samples)
}
}
+void QAbstractTexture::setMipLevels(int mipLevels)
+{
+ Q_D(QAbstractTexture);
+ if (d->m_mipmapLevels != mipLevels) {
+ d->m_mipmapLevels = mipLevels;
+ emit mipLevelsChanged(mipLevels);
+ }
+}
+
/*!
Returns the number of samples per texel for the texture provider.
@@ -601,6 +610,22 @@ int QAbstractTexture::samples() const
}
/*!
+ \property Qt3DRender::QAbstractTexture::mipLevels
+
+ Holds the mipmap levels of the texture provider.
+ */
+/*!
+ \qmlproperty int Qt3DRender::QAbstractTexture::format
+
+ Holds the mipmap levels of the texture provider.
+ */
+int QAbstractTexture::mipLevels() const
+{
+ Q_D(const QAbstractTexture);
+ return d->m_mipmapLevels;
+}
+
+/*!
\property Qt3DRender::QAbstractTexture::format
Holds the format of the texture provider.