PDA

View Full Version : OpenGL sRGB framebuffer oddity



Chris_F
09-15-2014, 12:00 PM
I'm using GLFW3 to create a context and I've noticed that the GLFW_SRGB_CAPABLE property seems to have no effect. Regardless of what I set it to, I always get sRGB conversion when GL_FRAMEBUFFER_SRGB is enabled. My understanding is that when GL_FRAMEBUFFER_SRGB is enabled, you get sRGB conversion only if the framebuffer is a sRGB format. To add to the confusion, if I check the GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING I get GL_LINEAR regardless of what I set GLFW_SRGB_CAPABLE to.

I'm using a Nvidia GTX 760 with the 340.76 drivers.

Chris_F
09-19-2014, 05:48 PM
Can nobody offer any insights on this issue? This doesn't appear to be an issue with GLFW. I created a window and context manually and was sure to set WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB to true.

Am I checking this correctly?




glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFF ER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &enc);



This should return GL_SRGB, should it not? If it is applying sRGB correction regardless of what WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB is set to, then is Nvidia's driver not broken? Nobody has noticed this until now?