diff options
| author | Jannik Vogel <email@jannikvogel.de> | 2016-05-12 22:57:15 +0200 |
|---|---|---|
| committer | Jannik Vogel <email@jannikvogel.de> | 2016-05-12 22:57:40 +0200 |
| commit | 5864cb7e00d241473b43f8895449f8cebb9e7ec5 (patch) | |
| tree | 64decd59c20ccb7f8c3326758fabe2552f469827 /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | f6eb62d0628d31efc4f93a0057ebd85bb39bc0fe (diff) | |
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); } |
