From bbbfdb851ac940bf65d5b2c09e198b65f209e4c5 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Mon, 9 Feb 2015 21:02:30 -0500 Subject: [PATCH] GLRenderer: log texture formats as Level.FINE --- .../com/jme3/renderer/opengl/TextureUtil.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) 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) {