Sign in to follow this  
Chris_F

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 this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this