From b72d980a8a8b077c415254372ddd25698fd047ee Mon Sep 17 00:00:00 2001 From: xMyran Date: Mon, 30 Nov 2015 19:03:27 +0100 Subject: [PATCH 1/2] Added BGFX_RESET_SRGB_BACKBUFFER to GL --- src/renderer_gl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index a61cd89d..290411f1 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2481,6 +2481,11 @@ namespace bgfx { namespace gl if (!isValid(_fbh) ) { GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaBackBufferFbo) ); + + if (0 != (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER)) + GL_CHECK(glEnable(GL_FRAMEBUFFER_SRGB)); + else + GL_CHECK(glDisable(GL_FRAMEBUFFER_SRGB)); } else { From eb6833bea4fed12a39d3a8b50129e88f1887fe0e Mon Sep 17 00:00:00 2001 From: xMyran Date: Mon, 30 Nov 2015 21:52:57 +0100 Subject: [PATCH 2/2] Debug build mistake --- src/renderer_gl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 290411f1..ccd13686 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2483,9 +2483,13 @@ namespace bgfx { namespace gl GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_msaaBackBufferFbo) ); if (0 != (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER)) + { GL_CHECK(glEnable(GL_FRAMEBUFFER_SRGB)); + } else + { GL_CHECK(glDisable(GL_FRAMEBUFFER_SRGB)); + } } else {