diff options
author | bunnei <bunneidev@gmail.com> | 2016-05-17 02:00:21 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-05-17 02:00:21 +0200 |
commit | e5599ed300b4992e53425df63c7f217171f35603 (patch) | |
tree | b09211d211a75491d4600479132194da71b45d2d /src/video_core/renderer_opengl/gl_state.cpp | |
parent | Merge pull request #1787 from JayFoxRox/refactor-jit (diff) | |
parent | OpenGL: Support blend equation (diff) | |
download | yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar.gz yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar.bz2 yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar.lz yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar.xz yuzu-e5599ed300b4992e53425df63c7f217171f35603.tar.zst yuzu-e5599ed300b4992e53425df63c7f217171f35603.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 02cd9f417..fa141fc9a 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -36,6 +36,8 @@ OpenGLState::OpenGLState() { stencil.action_stencil_fail = GL_KEEP; blend.enabled = false; + blend.rgb_equation = GL_FUNC_ADD; + blend.a_equation = GL_FUNC_ADD; blend.src_rgb_func = GL_ONE; blend.dst_rgb_func = GL_ZERO; blend.src_a_func = GL_ONE; @@ -165,6 +167,11 @@ void OpenGLState::Apply() const { blend.src_a_func, blend.dst_a_func); } + if (blend.rgb_equation != cur_state.blend.rgb_equation || + blend.a_equation != cur_state.blend.a_equation) { + glBlendEquationSeparate(blend.rgb_equation, blend.a_equation); + } + if (logic_op != cur_state.logic_op) { glLogicOp(logic_op); } |