diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java index e0cd11e20..cca0d8212 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/TextureUtil.java @@ -65,20 +65,22 @@ final class TextureUtil { } public void initialize(EnumSet caps) { - StringBuilder sb = new StringBuilder(); this.formats = GLImageFormats.getFormatsForCaps(caps); - sb.append("Supported texture formats: \n"); - for (int i = 0; i < Format.values().length; i++) { - Format format = Format.values()[i]; - if (formats[0][i] != null) { - boolean srgb = formats[1][i] != null; - sb.append("\t").append(format.toString()); - sb.append(" (Linear"); - if (srgb) sb.append("/sRGB"); - sb.append(")\n"); + if (logger.isLoggable(Level.FINE)) { + StringBuilder sb = new StringBuilder(); + sb.append("Supported texture formats: \n"); + for (int i = 0; i < Format.values().length; i++) { + Format format = Format.values()[i]; + if (formats[0][i] != null) { + boolean srgb = formats[1][i] != null; + sb.append("\t").append(format.toString()); + sb.append(" (Linear"); + if (srgb) sb.append("/sRGB"); + sb.append(")\n"); + } } + logger.log(Level.FINE, sb.toString()); } - logger.log(Level.INFO, sb.toString()); } public GLImageFormat getImageFormat(Format fmt, boolean isSrgb) {