diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-26 05:01:41 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 20:55:23 +0100 |
commit | 04d11341911a0c9ed3558fc6084d305ae262399a (patch) | |
tree | 914f6193fce38f2fd52dce46442fb21254e5ea57 /src/video_core/renderer_opengl/renderer_opengl.cpp | |
parent | gl_state: Remove VAO cache and tracking (diff) | |
download | yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.gz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.bz2 yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.lz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.xz yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.tar.zst yuzu-04d11341911a0c9ed3558fc6084d305ae262399a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 2fb5938e2..4d41ac7b4 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -555,11 +555,15 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, }; state.textures[0] = screen_info.display_texture; - state.framebuffer_srgb.enabled = screen_info.display_srgb; state.Apply(); // TODO: Signal state tracker about these changes glEnable(GL_CULL_FACE); + if (screen_info.display_srgb) { + glEnable(GL_FRAMEBUFFER_SRGB); + } else { + glDisable(GL_FRAMEBUFFER_SRGB); + } glDisable(GL_COLOR_LOGIC_OP); glDisable(GL_ALPHA_TEST); glDisable(GL_DEPTH_TEST); @@ -577,8 +581,8 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices)); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + // Restore default state - state.framebuffer_srgb.enabled = false; state.textures[0] = 0; state.Apply(); } |