diff options
| author | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-14 00:02:54 -0300 |
|---|---|---|
| committer | Rodolfo Bogado <rodolfoosvaldobogado@gmail.com> | 2018-11-17 19:59:34 -0300 |
| commit | 53b4a1af0f8a8c1e7c0ad27c76adf3b0e86bef13 (patch) | |
| tree | dbcb83fe2bde8d215f6665a614d7530e7cb1411e /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | 8ed7e1af2c8d859ca5e1bd05e199b1f14099c8b4 (diff) | |
add AlphaToCoverage and AlphaToOne
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 6998dd92b..f6d80614b 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -16,6 +16,8 @@ OpenGLState::OpenGLState() { // These all match default OpenGL values geometry_shaders.enabled = false; framebuffer_srgb.enabled = false; + multisample_control.alpha_to_coverage = false; + multisample_control.alpha_to_one = false; cull.enabled = false; cull.mode = GL_BACK; cull.front_face = GL_CCW; @@ -504,6 +506,21 @@ void OpenGLState::Apply() const { fragment_color_clamp.enabled ? GL_TRUE : GL_FALSE); } } + if (multisample_control.alpha_to_coverage != cur_state.multisample_control.alpha_to_coverage) { + if (multisample_control.alpha_to_coverage) { + glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE); + } else { + glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE); + } + } + if (multisample_control.alpha_to_one != cur_state.multisample_control.alpha_to_one) { + if (multisample_control.alpha_to_one) { + glEnable(GL_SAMPLE_ALPHA_TO_ONE); + } else { + glDisable(GL_SAMPLE_ALPHA_TO_ONE); + } + } + ApplyColorMask(); ApplyViewport(); ApplyStencilTest(); |
