From 0287b2be6d1edeecea26250e5cd8d3067ff614af Mon Sep 17 00:00:00 2001 From: Rodolfo Bogado Date: Wed, 24 Oct 2018 17:09:40 -0300 Subject: Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB support --- src/video_core/renderer_opengl/gl_state.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl/gl_state.h') diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 4334b0d35..9e2c573b5 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -35,6 +35,10 @@ constexpr TextureUnit ProcTexDiffLUT{9}; class OpenGLState { public: + struct { + bool enabled; // GL_FRAMEBUFFER_SRGB + } framebuffer_srgb; + struct { bool enabled; // GL_CULL_FACE GLenum mode; // GL_CULL_FACE_MODE @@ -161,7 +165,12 @@ public: static OpenGLState GetCurState() { return cur_state; } - + static bool GetsRGBUsed() { + return s_rgb_used; + } + static void ClearsRGBUsed() { + s_rgb_used = false; + } /// Apply this state as the current OpenGL state void Apply() const; @@ -176,6 +185,9 @@ public: private: static OpenGLState cur_state; + // Workaround for sRGB problems caused by + // QT not supporting srgb output + static bool s_rgb_used; }; } // namespace OpenGL -- cgit v1.2.3