The documentation of SDL does not seem to mention much about color spaces. I don't see any SRGB flag/parameter for SDL_SetVideoMode
or SDL_GL_SetAttribute
. Is it possible at all for SDL to ask OpenGL to perform the color correction when writing on the FrameBuffer 0? GLUT seems to be able to provide that functionality.
If SDL cannot do it, what is the usual workaround? I am considering rendering to a sRGB texture with GL_FRAMEBUFFER_SRGB
enabled, and then rendering that into the FrameBuffer 0 with FRAMEBUFFER_SRGB
disabled. Any better idea?