diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index daf7eb533..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 @@ -50,6 +54,11 @@ public: } depth; struct { + bool enabled; + GLuint index; + } primitive_restart; // GL_PRIMITIVE_RESTART + + struct { GLboolean red_enabled; GLboolean green_enabled; GLboolean blue_enabled; @@ -156,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; @@ -171,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 |