* Forgot to remove withSRGB from LwjglCanvas

experimental
shadowislord 11 years ago
parent 52cd458601
commit 2aad768c8a
  1. 15
      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,10 +2565,21 @@ public class LwjglRenderer implements Renderer {
return; return;
} }
setFrameBuffer(null);
if (enableSrgb) { if (enableSrgb) {
if (!glGetBoolean(GL30.GL_FRAMEBUFFER_SRGB_CAPABLE)) { if (!glGetBoolean(GL30.GL_FRAMEBUFFER_SRGB_CAPABLE)) {
logger.warning("Driver claims that default framebuffer " + logger.warning("Driver claims that default framebuffer "
"is not sRGB capable. Enabling anyway."); + "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); glEnable(GL30.GL_FRAMEBUFFER_SRGB);

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

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

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

Loading…
Cancel
Save