# Odd framebuffer behavior

## Recommended Posts

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.

##### Share on other sites
maybe it's somehow related to whether you're rendering fullscreen or windowed, have you given that a try?

##### Share on other sites

maybe it's somehow related to whether you're rendering fullscreen or windowed, have you given that a try?

In fullscreen mode I still get GL_LINEAR.

##### Share on other sites

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_FRAMEBUFFER, 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?

Edited by Chris_F