From 5ef3265cd46de6579399562429e26961d6f13885 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Sun, 22 Jan 2017 20:22:14 +0100 Subject: 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 Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/util/qsgtexture.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/quick/scenegraph/util/qsgtexture.h') diff --git a/src/quick/scenegraph/util/qsgtexture.h b/src/quick/scenegraph/util/qsgtexture.h index f0509b58ae..035acc02b1 100644 --- a/src/quick/scenegraph/util/qsgtexture.h +++ b/src/quick/scenegraph/util/qsgtexture.h @@ -67,6 +67,14 @@ public: Linear }; + enum AnisotropyLevel { + AnisotropyNone, + Anisotropy2x, + Anisotropy4x, + Anisotropy8x, + Anisotropy16x + }; + virtual int textureId() const = 0; virtual QSize textureSize() const = 0; virtual bool hasAlphaChannel() const = 0; @@ -87,6 +95,9 @@ public: void setFiltering(Filtering filter); QSGTexture::Filtering filtering() const; + void setAnisotropyLevel(AnisotropyLevel level); + QSGTexture::AnisotropyLevel anisotropyLevel() const; + void setHorizontalWrapMode(WrapMode hwrap); QSGTexture::WrapMode horizontalWrapMode() const; -- cgit v1.2.3