From a683fbb16c8cc43e115d8b9d24439c16eee30a97 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Fri, 27 Mar 2015 21:39:27 -0400 Subject: [PATCH] Texture: allow setting aniso = 0, since that's the default anyway --- jme3-core/src/main/java/com/jme3/texture/Texture.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture.java b/jme3-core/src/main/java/com/jme3/texture/Texture.java index b41d2ac10..582d06565 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture.java @@ -488,7 +488,8 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable /** * @return the anisotropic filtering level for this texture. Default value - * is 1 (no anisotrophy), 2 means x2, 4 is x4, etc. + * is 0 (use value from config), + * 1 means 1x (no anisotrophy), 2 means x2, 4 is x4, etc. */ public int getAnisotropicFilter() { return anisotropicFilter; @@ -499,11 +500,7 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable * the anisotropic filtering level for this texture. */ public void setAnisotropicFilter(int level) { - if (level < 1) { - anisotropicFilter = 1; - } else { - anisotropicFilter = level; - } + anisotropicFilter = Math.max(0, level); } @Override