diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2026-04-23 14:32:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-23 13:32:11 +0100 |
| commit | b65714e3b8e123fb2febd507905d25fa6abd0400 (patch) | |
| tree | 08756b4f26ff5872387f8869d85eebebb61338d7 /src/render/OpenGL.cpp | |
| parent | 300cdb7c3241969ac04cd02a5e13010a28ebb830 (diff) | |
opengl: minor egl changes (#14147)
* opengl: explicitly set stencil mask
set stencil mask to 0xFF to allow writes, when done set it back to 0x00
to become readonly, avoids potential mishaps. also at the end set the
stencil op to GL_KEEP and it will certainly be read only until next time
its changed.
* opengl: use modern glClearBufferfv over glClear
use more modern glClearBufferfv instead, and also clear the entire
buffer if a clearpass has been added but no renderdamage exist.
Diffstat (limited to 'src/render/OpenGL.cpp')
| -rw-r--r-- | src/render/OpenGL.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 590330a3..7051c10c 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1933,6 +1933,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(SP<ITexture> tex, const CBox if (NEEDS_STENCIL) { scissor(nullptr); // allow the entire window and stencil to render + glStencilMask(0xFF); glClearStencil(0); glClear(GL_STENCIL_BUFFER_BIT); @@ -1964,7 +1965,8 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(SP<ITexture> tex, const CBox glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glStencilFunc(GL_EQUAL, 1, 0xFF); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + glStencilMask(0x00); + glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); } // stencil done. Render everything. |
