In OpenGL ES, I can create sRGB render buffers using either OpenGL ES 3.0 or OpenGL ES 2.0 with the extension GL_EXT_sRGB. I create a renderable texture with internal format GL_SRGB8_ALPHA8 (or GL_SRGB8_ALPHA8_EXT) and it works fine on the Android devices that support it.
However, I can't find any way to make the default render buffer use sRGB on Android. I'm using GLSurfaceView, so it goes through EGL and eglChooseConfig, but I can't find what attribute, if any, governs the sRGB setting.
I can of course work around it by rendering to an sRGB target and then copying to the backbuffer before display, but that is rather wasteful. It was much easier to do in OpenGL and DirectX, but OpenGL ES needs the sRGB setting to be applied when the render buffer/frame buffer is created.
Any ideas?