LWJGL Forum

Programming => OpenGL => Topic started by: integeruser on February 23, 2012, 20:35:46

Title: sRGB Framebuffers
Post by: integeruser on February 23, 2012, 20:35:46
In LWJGL, is it possible to create SRGB framebuffers?
Title: Re: sRGB Framebuffers
Post by: spasi on February 25, 2012, 22:54:59
Yes. You need to check for the GL_ARB_framebuffer_sRGB extension and use new PixelFormat(...).withSRGB(true).
Title: Re: sRGB Framebuffers
Post by: integeruser on February 28, 2012, 22:19:24
Thank you for the response, i've already tried withSRGB(true) but it seems not work. I have now checked the extension and its value is true, so i have the requisites...I'll re-check my code, if i don't find what is wrong i'll write here!
Title: Re: sRGB Framebuffers
Post by: elect on September 01, 2015, 12:45:33
Quote from: spasi on February 25, 2012, 22:54:59
Yes. You need to check for the GL_ARB_framebuffer_sRGB extension and use new PixelFormat(...).withSRGB(true).

is PixelFormat().withSRGB(true) equals to this in FreeGLUT?

unsigned int defaults(unsigned int displayMode, int &width, int &height)
{
    return displayMode | GLUT_SRGB;
}


Reference (http://web.archive.org/web/20140131102945/http://www.arcsynthesis.org/gltut/Texturing/Tut16%20Free%20Gamma%20Correction.html)
Title: Re: sRGB Framebuffers
Post by: spasi on September 01, 2015, 13:05:44
Looks like it, yes.