Disabl sRGB framebuffer on irrlicht side to avoid modifying current user interface colors

This commit is contained in:
Deve 2015-12-11 00:11:24 +01:00
parent 0216fd9697
commit b91bcaf554
2 changed files with 16 additions and 16 deletions

View File

@ -805,13 +805,13 @@ bool COpenGLDriver::genericDriverInit()
Params.HandleSRGB &= ((FeatureAvailable[IRR_ARB_framebuffer_sRGB] || FeatureAvailable[IRR_EXT_framebuffer_sRGB]) &&
FeatureAvailable[IRR_EXT_texture_sRGB]);
#if defined(GL_ARB_framebuffer_sRGB)
if (Params.HandleSRGB)
glEnable(GL_FRAMEBUFFER_SRGB);
#elif defined(GL_EXT_framebuffer_sRGB)
if (Params.HandleSRGB)
glEnable(GL_FRAMEBUFFER_SRGB_EXT);
#endif
//#if defined(GL_ARB_framebuffer_sRGB)
// if (Params.HandleSRGB)
// glEnable(GL_FRAMEBUFFER_SRGB);
//#elif defined(GL_EXT_framebuffer_sRGB)
// if (Params.HandleSRGB)
// glEnable(GL_FRAMEBUFFER_SRGB_EXT);
//#endif
// This is a fast replacement for NORMALIZE_NORMALS
// if ((Version>101) || FeatureAvailable[IRR_EXT_rescale_normal])

View File

@ -274,15 +274,15 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_RGBA8;
}
}
#if defined(GL_ARB_framebuffer_sRGB) || defined(GL_EXT_framebuffer_sRGB)
if (Driver->Params.HandleSRGB)
{
if (internalformat==GL_RGBA)
internalformat=GL_SRGB_ALPHA_EXT;
else if (internalformat==GL_RGB)
internalformat=GL_SRGB_EXT;
}
#endif
//#if defined(GL_ARB_framebuffer_sRGB) || defined(GL_EXT_framebuffer_sRGB)
// if (Driver->Params.HandleSRGB)
// {
// if (internalformat==GL_RGBA)
// internalformat=GL_SRGB_ALPHA_EXT;
// else if (internalformat==GL_RGB)
// internalformat=GL_SRGB_EXT;
// }
//#endif
return internalformat;
}