Code: Select all
// Allocate internal buffer so that glTexSubImageXD can be used
// Internal format
GLenum format = GLPixelUtil::getClosestGLInternalFormat(mFormat, mHwGamma);
std::cout << "gamma: " << (mHwGamma?"true":"false") << " format: "<< format << std::endl;
gamma: true format: 35907
gamma: true format: 35917
Which I have found to be
#define GL_SRGB8_ALPHA8_EXT 0x8C43
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
So that's all good.
However I don't see a change. The textures ought to appear darker due to the gamma conversion. I have been doing gamma correction manually in the shader for some time so I know what to expect.
The SRGB framebuffer is working for me though, I can disable the manual gamma conversion I have previously been doing on output. However I am still having to do manual conversion on input because the hardware is not doing it for me.
Is there anything I have to do in the shader (CG) to make this work?
edit: does work in d3d9, doesn't work in windows or linux gl, probably therefore not a driver problem, probably a bug in gl rendersystem?