hello.
I don't quite understand how combination of GL_FRAMEBUFFER_SRGB and framebuffer works.
Without a framebuffer it is straightforward - Linear color space converts to sRGB.
But when i use additional framebuffer then things are bit weird.
1) If i attach GL_RGB image format to framebuffer then glEnable(GL_FRAMEBUFFER_SRGB) ignores framebuffer and affects only screen render.
2) if i use GL_SRGB framebuffer image with gDisable(GL_FRAMEBUFFER_SRGB)(disabled for framebuffer and screen) then screen is black.
3) If i use GL_SRGB with gEnabled(GL_FRAMEBUFFER_SRGB) only for framebuffer then the final screen image looks like it is without gamma correction.
4) If i use GL_SRGB with gEnabled(GL_FRAMEBUFFER_SRGB) for framebuffer and screen render then the final screen image is with gamma correction.
Point 3 is probably because opengl sees that framebuffer image is SRGB and converts it to the linear space and the resulting image is in the original linear space.
Point 4 is similar to point 3 but there is final conversion to sRGB space and the resulting image is in the correct sRGB space.
What about point 2? Is it because there is only conversion from linear to linear space and the image becomes even darker?
What about point1. Why is framebuffer not affected by glEnable(GL_FRAMEBUFFER_SRGB) in that case?