* Forgot to remove withSRGB from LwjglCanvas

experimental
shadowislord 11 years ago
parent 52cd458601
commit 2aad768c8a
  1. 19
      jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/LwjglRenderer.java
  2. 6
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java
  3. 3
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java
  4. 3
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java

@ -2565,14 +2565,25 @@ public class LwjglRenderer implements Renderer {
return;
}
setFrameBuffer(null);
if (enableSrgb) {
if (!glGetBoolean(GL30.GL_FRAMEBUFFER_SRGB_CAPABLE)) {
logger.warning("Driver claims that default framebuffer " +
"is not sRGB capable. Enabling anyway.");
logger.warning("Driver claims that default framebuffer "
+ "is not sRGB capable. Enabling anyway.");
}
int encoding = GL30.glGetFramebufferAttachmentParameteri(GL30.GL_DRAW_FRAMEBUFFER,
GL_FRONT_LEFT,
GL30.GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING);
if (encoding != GL21.GL_SRGB) {
logger.warning("Driver claims that default framebuffer "
+ "is not using sRGB color encoding. Enabling anyway.");
}
glEnable(GL30.GL_FRAMEBUFFER_SRGB);
logger.log(Level.FINER, "SRGB FrameBuffer enabled (Gamma Correction)");
} else {
glDisable(GL30.GL_FRAMEBUFFER_SRGB);

@ -308,8 +308,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
0,
0,
0,
settings.useStereo3D())
.withSRGB(settings.getGammaCorrection());
settings.useStereo3D());
}
return pbufferFormat;
}else{
@ -323,8 +322,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
0,
0,
0,
settings.useStereo3D())
.withSRGB(settings.getGammaCorrection());
settings.useStereo3D());
}
return canvasFormat;
}

@ -91,8 +91,7 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
0,
0,
0,
settings.useStereo3D())
.withSRGB(settings.getGammaCorrection());
settings.useStereo3D());
frameRate = settings.getFrameRate();
logger.log(Level.FINE, "Selected display mode: {0}", displayMode);

@ -65,8 +65,7 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable {
0,
settings.getDepthBits(),
settings.getStencilBits(),
samples)
.withSRGB(settings.getGammaCorrection());
samples);
width = settings.getWidth();
height = settings.getHeight();

Loading…
Cancel
Save