.withSRGB(true) doesn't affect the rendering

Started by laserlars, October 10, 2013, 21:08:02

Previous topic - Next topic

laserlars

Hi!

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?

Br

spasi

You also need to do a glEnable(GL_FRAMEBUFFER_SRGB) for sRGB conversion to become active. See issues 3) and 4) in the extension.

laserlars

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 :)