|
|
|
@ -65,20 +65,22 @@ final class TextureUtil { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void initialize(EnumSet<Caps> 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) { |
|
|
|
|