|
|
@ -100,8 +100,7 @@ public class MipMapGenerator { |
|
|
|
public static Image resizeToPowerOf2(Image original){ |
|
|
|
public static Image resizeToPowerOf2(Image original){ |
|
|
|
int potWidth = FastMath.nearestPowerOfTwo(original.getWidth()); |
|
|
|
int potWidth = FastMath.nearestPowerOfTwo(original.getWidth()); |
|
|
|
int potHeight = FastMath.nearestPowerOfTwo(original.getHeight()); |
|
|
|
int potHeight = FastMath.nearestPowerOfTwo(original.getHeight()); |
|
|
|
int potSize = Math.max(potWidth, potHeight); |
|
|
|
return scaleImage(original, potWidth, potHeight); |
|
|
|
return scaleImage(original, potSize, potSize); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void generateMipMaps(Image image){ |
|
|
|
public static void generateMipMaps(Image image){ |
|
|
|