aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgtexturematerial.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-01-22 20:22:14 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-01-25 12:32:25 +0000
commit5ef3265cd46de6579399562429e26961d6f13885 (patch)
tree6b71510ab9168600a4a146cca878f7f031c3f8f5 /src/quick/scenegraph/util/qsgtexturematerial.h
parent3ca8c880c163708757a5e88fb7e01268b775dc0e (diff)
Add anisotropic filtering support to QSGTexture
This patch adds support to switch on anisotropic filtering on QSGTexture and to QSGDefaultImageNode. Not adding this support to QSGImageNode since it became public in 5.8, and it does not allow additional virtual methods anymore. Change-Id: Ibf1744845df2297f9129b1b5ce6a69d0a3b31c7c Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/quick/scenegraph/util/qsgtexturematerial.h')
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.h b/src/quick/scenegraph/util/qsgtexturematerial.h
index dc87131773..87d8e5fd49 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.h
+++ b/src/quick/scenegraph/util/qsgtexturematerial.h
@@ -69,6 +69,9 @@ public:
void setVerticalWrapMode(QSGTexture::WrapMode mode) { m_vertical_wrap = mode; }
QSGTexture::WrapMode verticalWrapMode() const { return QSGTexture::WrapMode(m_vertical_wrap); }
+ void setAnisotropyLevel(QSGTexture::AnisotropyLevel level) { m_anisotropy_level = level; }
+ QSGTexture::AnisotropyLevel anisotropyLevel() const { return QSGTexture::AnisotropyLevel(m_anisotropy_level); }
+
protected:
QSGTexture *m_texture;
@@ -76,8 +79,8 @@ protected:
uint m_mipmap_filtering: 2;
uint m_horizontal_wrap : 1;
uint m_vertical_wrap: 1;
-
- uint m_reserved : 26;
+ uint m_anisotropy_level : 3;
+ uint m_reserved : 23;
};