From b0afa6ab3d81aaa7ef42b40b9829a6d2a06981a4 Mon Sep 17 00:00:00 2001 From: Deve Date: Sat, 6 Jan 2018 23:15:22 +0100 Subject: [PATCH] Add srgb attrib in egl only if requested --- lib/irrlicht/source/Irrlicht/CContextEGL.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/irrlicht/source/Irrlicht/CContextEGL.cpp b/lib/irrlicht/source/Irrlicht/CContextEGL.cpp index 1ecdd4563..7ce168d96 100644 --- a/lib/irrlicht/source/Irrlicht/CContextEGL.cpp +++ b/lib/irrlicht/source/Irrlicht/CContextEGL.cpp @@ -311,13 +311,13 @@ bool ContextManagerEGL::createSurface() std::vector attribs; - if (m_creation_params.opengl_api == CEGL_API_OPENGL) + if (m_creation_params.opengl_api == CEGL_API_OPENGL && + m_creation_params.handle_srgb == true) { if (hasEGLExtension("EGL_KHR_gl_colorspace") || m_egl_version >= 150) { attribs.push_back(EGL_GL_COLORSPACE); - attribs.push_back(m_creation_params.handle_srgb ? - EGL_GL_COLORSPACE_SRGB : EGL_GL_COLORSPACE_LINEAR); + attribs.push_back(EGL_GL_COLORSPACE_SRGB); colorspace_attr_pos = attribs.size() - 1; } } @@ -350,8 +350,7 @@ bool ContextManagerEGL::createSurface() } } - if (m_egl_surface == EGL_NO_SURFACE && colorspace_attr_pos > 0 && - m_creation_params.handle_srgb == true) + if (m_egl_surface == EGL_NO_SURFACE && colorspace_attr_pos > 0) { attribs[colorspace_attr_pos] = EGL_GL_COLORSPACE_LINEAR;