diff options
author | Subv <subv2112@gmail.com> | 2015-08-20 17:11:09 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-08-20 17:11:09 +0200 |
commit | 46f660a789ff02f9cd86600ed82e0936b049b176 (patch) | |
tree | ddb2c54c86025ac338549922c7c548844e38a68e /src/video_core/renderer_opengl/gl_state.cpp | |
parent | GPU/Rasterizer: Corrected the stencil implementation. (diff) | |
download | yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar.gz yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar.bz2 yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar.lz yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar.xz yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.tar.zst yuzu-46f660a789ff02f9cd86600ed82e0936b049b176.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 871324014..ba47ce8b8 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -26,6 +26,9 @@ OpenGLState::OpenGLState() { stencil.test_ref = 0; stencil.test_mask = -1; stencil.write_mask = -1; + stencil.action_depth_fail = GL_KEEP; + stencil.action_depth_pass = GL_KEEP; + stencil.action_stencil_fail = GL_KEEP; blend.enabled = false; blend.src_rgb_func = GL_ONE; @@ -105,6 +108,12 @@ void OpenGLState::Apply() { glStencilFunc(stencil.test_func, stencil.test_ref, stencil.test_mask); } + if (stencil.action_depth_fail != cur_state.stencil.action_depth_fail || + stencil.action_depth_pass != cur_state.stencil.action_depth_pass || + stencil.action_stencil_fail != cur_state.stencil.action_stencil_fail) { + glStencilOp(stencil.action_stencil_fail, stencil.action_depth_fail, stencil.action_depth_pass); + } + // Stencil mask if (stencil.write_mask != cur_state.stencil.write_mask) { glStencilMask(stencil.write_mask); |