diff options
| author | bunnei <bunneidev@gmail.com> | 2018-10-28 00:24:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-28 00:24:36 -0400 |
| commit | 1fca683388c3c96dd61f271772a4de43bd43a00b (patch) | |
| tree | 5f7a74be1a36768819c2cd413b1ad05fd8086f90 /src/video_core/renderer_opengl/gl_state.h | |
| parent | a9d60c6103bd67881c0e2c92528da0897a5e1f16 (diff) | |
| parent | 0287b2be6d1edeecea26250e5cd8d3067ff614af (diff) | |
Merge pull request #1582 from Tinob/master
Implement sRGB support
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 14 |
1 files changed, 13 insertions, 1 deletions
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 @@ -36,6 +36,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 GLenum front_face; // GL_FRONT_FACE @@ -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 |
