From 48ce86e607fc09d5976221064341a3f96dacc861 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 15 Jan 2012 02:10:30 +0000 Subject: [PATCH] - throw exception on unsupported format in TextureAtlas - remove clamp workaround in texture atlas git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9041 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../tools/jme3tools/optimize/TextureAtlas.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/engine/src/tools/jme3tools/optimize/TextureAtlas.java b/engine/src/tools/jme3tools/optimize/TextureAtlas.java index 668d34918..880c2ad34 100644 --- a/engine/src/tools/jme3tools/optimize/TextureAtlas.java +++ b/engine/src/tools/jme3tools/optimize/TextureAtlas.java @@ -43,8 +43,6 @@ import java.nio.FloatBuffer; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; -import java.util.logging.Level; -import java.util.logging.Logger; /** * @@ -52,7 +50,6 @@ import java.util.logging.Logger; */ public class TextureAtlas { - private static final Logger logger = Logger.getLogger(TextureAtlas.class.getName()); private Map images; private int atlasWidth, atlasHeight; private Format format = Format.ABGR8; @@ -203,7 +200,7 @@ public class TextureAtlas { image[i + 2] = sourceData.get(j + 1); //g image[i + 3] = sourceData.get(j); //r } else { - logger.log(Level.WARNING, "Could not draw texture with format {0}", source.getFormat()); + throw new UnsupportedOperationException("Could not draw texture with format " + source.getFormat()); } } } @@ -336,19 +333,6 @@ public class TextureAtlas { Vector2f location = new Vector2f(x, y); float prevX = previousLocation.x; float prevY = previousLocation.y; - //TODO: remove workaround for texture wrap - if (prevX > 1) { - prevX = 1; - } - if (prevY > 1) { - prevY = 1; - } - if (prevX < 0) { - prevX = 0; - } - if (prevY < 0) { - prevY = 0; - } location.addLocal(prevX * w, prevY * h); return location; }