diff options
| author | bunnei <bunneidev@gmail.com> | 2016-05-16 20:00:21 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2016-05-16 20:00:21 -0400 |
| commit | e5599ed300b4992e53425df63c7f217171f35603 (patch) | |
| tree | b09211d211a75491d4600479132194da71b45d2d /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | f40fabd688576fae7ab91195547a6967178b28dd (diff) | |
| parent | 5864cb7e00d241473b43f8895449f8cebb9e7ec5 (diff) | |
Merge pull request #1786 from JayFoxRox/blend-equation
OpenGL: Support blend equation
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -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); } |
