Hello Guest

.withSRGB(true) doesn't affect the rendering

  • 2 Replies
.withSRGB(true) doesn't affect the rendering
« on: October 10, 2013, 21:08:02 »

I've been doing some investigations and trying to understand why .withSRGB(true) doesn't give me different colors compare to when it's off.

         PixelFormat pixelFormat = new PixelFormat(8, 24, 0, config.getInt("Multisampling"));
         Display.create(pixelFormat.withSRGB(true), new ContextAttribs(2,1).withDebug(config.getBoolean("DebugMode")));

From what I understand it will use the: http://www.opengl.org/registry/specs/EXT/framebuffer_sRGB.txt extension. And that would been that all the fragments should be gamma adjusted (2.2)

But taking screenshots with it on and off gives the exact same results.

Any thoughts?

« Last Edit: October 10, 2013, 21:09:33 by laserlars »


Online spasi

  • *****
  • 2228
    • WebHotelier
Re: .withSRGB(true) doesn't affect the rendering
« Reply #1 on: October 10, 2013, 23:18:38 »
You also need to do a glEnable(GL_FRAMEBUFFER_SRGB) for sRGB conversion to become active. See issues 3) and 4) in the extension.

Re: .withSRGB(true) doesn't affect the rendering
« Reply #2 on: October 11, 2013, 09:31:32 »
Ah excellent! Thanks! I will check it when I get home from work!

I've shuld have spotted that in the specs. But reading the specs are not always trivial :)