From b91bcaf5540a265a47f40aea219884f85ffeadd6 Mon Sep 17 00:00:00 2001 From: Deve Date: Fri, 11 Dec 2015 00:11:24 +0100 Subject: [PATCH] Disabl sRGB framebuffer on irrlicht side to avoid modifying current user interface colors --- lib/irrlicht/source/Irrlicht/COpenGLDriver.cpp | 14 +++++++------- .../source/Irrlicht/COpenGLTexture.cpp | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/irrlicht/source/Irrlicht/COpenGLDriver.cpp b/lib/irrlicht/source/Irrlicht/COpenGLDriver.cpp index f2f527ec1..c8d9dc70f 100644 --- a/lib/irrlicht/source/Irrlicht/COpenGLDriver.cpp +++ b/lib/irrlicht/source/Irrlicht/COpenGLDriver.cpp @@ -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]) diff --git a/lib/irrlicht/source/Irrlicht/COpenGLTexture.cpp b/lib/irrlicht/source/Irrlicht/COpenGLTexture.cpp index ef20da830..a25cb4ca1 100644 --- a/lib/irrlicht/source/Irrlicht/COpenGLTexture.cpp +++ b/lib/irrlicht/source/Irrlicht/COpenGLTexture.cpp @@ -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; }