add log marker for video-log
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
package lwjake2;
|
package lwjake2;
|
||||||
|
|
||||||
|
import org.slf4j.Marker;
|
||||||
|
import org.slf4j.MarkerFactory;
|
||||||
|
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
|
|
||||||
public class Defines {
|
public class Defines {
|
||||||
@@ -1180,4 +1183,7 @@ public class Defines {
|
|||||||
public final static int SIZE_OF_INT = 4;
|
public final static int SIZE_OF_INT = 4;
|
||||||
|
|
||||||
public final static int SIZE_OF_FLOAT = 4;
|
public final static int SIZE_OF_FLOAT = 4;
|
||||||
|
|
||||||
|
// Log markers
|
||||||
|
public final static Marker MARKER_VIDEO = MarkerFactory.getMarker("VID");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import org.lwjgl.opengl.ARBMultitexture;
|
|||||||
import org.lwjgl.opengl.EXTSharedTexturePalette;
|
import org.lwjgl.opengl.EXTSharedTexturePalette;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import static lwjake2.Defines.MARKER_VIDEO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Image
|
* Image
|
||||||
*
|
*
|
||||||
@@ -248,7 +250,7 @@ public abstract class Image extends Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == NUM_GL_MODES) {
|
if (i == NUM_GL_MODES) {
|
||||||
log.warn("bad filter name: [{}]", string);
|
log.warn(MARKER_VIDEO, "bad filter name: [{}]", string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +284,7 @@ public abstract class Image extends Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == NUM_GL_ALPHA_MODES) {
|
if (i == NUM_GL_ALPHA_MODES) {
|
||||||
log.warn("bad alpha texture mode name: [{}]", string);
|
log.warn(MARKER_VIDEO, "bad alpha texture mode name: [{}]", string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,7 +304,7 @@ public abstract class Image extends Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == NUM_GL_SOLID_MODES) {
|
if (i == NUM_GL_SOLID_MODES) {
|
||||||
log.warn("bad solid texture mode name: [{}]", string);
|
log.warn(MARKER_VIDEO, "bad solid texture mode name: [{}]", string);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,7 +322,7 @@ public abstract class Image extends Main {
|
|||||||
int texels;
|
int texels;
|
||||||
final String[] palstrings = { "RGB", "PAL" };
|
final String[] palstrings = { "RGB", "PAL" };
|
||||||
|
|
||||||
log.info("------------------");
|
log.info(MARKER_VIDEO, "------------------");
|
||||||
texels = 0;
|
texels = 0;
|
||||||
|
|
||||||
for (int i = 0; i < numgltextures; i++) {
|
for (int i = 0; i < numgltextures; i++) {
|
||||||
@@ -349,14 +351,14 @@ public abstract class Image extends Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sb.append(" {} {} {}: {}");
|
sb.append(" {} {} {}: {}");
|
||||||
log.info(sb.toString(),
|
log.info(MARKER_VIDEO, sb.toString(),
|
||||||
image.upload_width,
|
image.upload_width,
|
||||||
image.upload_height,
|
image.upload_height,
|
||||||
(image.paletted ? 1 : 0),
|
image.paletted ? 1 : 0,
|
||||||
image.name
|
image.name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
log.info("Total texel count (not counting mipmaps): {}", texels);
|
log.info(MARKER_VIDEO, "Total texel count (not counting mipmaps): {}", texels);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -455,7 +457,7 @@ public abstract class Image extends Main {
|
|||||||
byte[] raw = fileSystem.loadFile(filename);
|
byte[] raw = fileSystem.loadFile(filename);
|
||||||
|
|
||||||
if (raw == null) {
|
if (raw == null) {
|
||||||
log.debug(/*Defines.PRINT_DEVELOPER*/"Bad pcx file {}", filename);
|
log.debug(MARKER_VIDEO, "Bad pcx file {}", filename);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,7 +473,7 @@ public abstract class Image extends Main {
|
|||||||
|| pcx.xmax >= 640
|
|| pcx.xmax >= 640
|
||||||
|| pcx.ymax >= 480) {
|
|| pcx.ymax >= 480) {
|
||||||
|
|
||||||
log.warn("Bad pcx file {}", filename);
|
log.warn(MARKER_VIDEO, "Bad pcx file {}", filename);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,7 +555,7 @@ public abstract class Image extends Main {
|
|||||||
|
|
||||||
if (raw == null)
|
if (raw == null)
|
||||||
{
|
{
|
||||||
log.debug(/*Defines.PRINT_DEVELOPER*/"Bad tga file {}", name);
|
log.debug(MARKER_VIDEO, "Bad tga file {}", name);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1116,7 +1118,7 @@ public abstract class Image extends Main {
|
|||||||
else if (samples == gl_alpha_format)
|
else if (samples == gl_alpha_format)
|
||||||
comp = gl_tex_alpha_format;
|
comp = gl_tex_alpha_format;
|
||||||
else {
|
else {
|
||||||
log.info("Unknown number of texture components {}", samples);
|
log.info(MARKER_VIDEO, "Unknown number of texture components {}", samples);
|
||||||
comp = samples;
|
comp = samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1435,7 +1437,7 @@ public abstract class Image extends Main {
|
|||||||
|
|
||||||
byte[] raw = fileSystem.loadFile(name);
|
byte[] raw = fileSystem.loadFile(name);
|
||||||
if (raw == null) {
|
if (raw == null) {
|
||||||
log.info("GL_FindImage: can't load {}", name);
|
log.info(MARKER_VIDEO, "GL_FindImage: can't load {}", name);
|
||||||
return r_notexture;
|
return r_notexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user