From 1789facddbecb1dd974281e3248f892eacef3c76 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 14 Apr 2022 17:45:18 +0200 Subject: [PATCH] fixed some nested render bugs --- src/render/OpenGL.cpp | 8 ++++---- src/render/Renderer.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 15d233fe..8c6ccdbd 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -361,7 +361,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(const CTexture& tex, wlr_box // if blur disabled, just render the texture if (g_pConfigManager->getInt("decoration:blur") == 0) { - renderTexture(tex, pBox, a, round); + renderTextureInternal(tex, pBox, a, round); return; } @@ -384,7 +384,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(const CTexture& tex, wlr_box glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); // render our window to the mirror FB while also writing to the stencil - renderTexture(tex, pBox, a, round); + renderTextureInternal(tex, pBox, a, round); // then we disable writing to the mask and ONLY accept writing within the stencil glStencilFunc(GL_EQUAL, 1, -1); @@ -448,7 +448,7 @@ void CHyprOpenGLImpl::renderTextureWithBlurInternal(const CTexture& tex, wlr_box // when the blur is done, let's render the window itself // we get it from the mirrored FB full because it's the FB 255 alpha cuz we rendered with a before, same for rounding - renderTexture(m_mMonitorRenderResources[m_RenderData.pMonitor].mirrorFB.m_cTex, &fullMonBox, 255.f, 0); + renderTextureInternal(m_mMonitorRenderResources[m_RenderData.pMonitor].mirrorFB.m_cTex, &fullMonBox, 255.f, 0); // and disable the stencil glStencilMask(-1); @@ -618,7 +618,7 @@ void CHyprOpenGLImpl::renderSnapshot(CWindow** pWindow) { wlr_box windowBox = {0, 0, PMONITOR->vecSize.x, PMONITOR->vecSize.y}; - renderTexture(it->second.m_cTex, &windowBox, PWINDOW->m_fAlpha, 0); + renderTextureInternal(it->second.m_cTex, &windowBox, PWINDOW->m_fAlpha, 0); } void CHyprOpenGLImpl::createBGTextureForMonitor(SMonitor* pMonitor) { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index f81e9e71..a85f2b32 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -457,7 +457,7 @@ void CHyprRenderer::damageWindow(CWindow* pWindow) { } else { // damage by real size & pos + border size * 2 (JIC) const auto BORDERSIZE = g_pConfigManager->getInt("general:border_size"); - wlr_box damageBox = { pWindow->m_vRealPosition.x - BORDERSIZE * 2 - 1, pWindow->m_vRealPosition.y - BORDERSIZE * 2 - 1, pWindow->m_vRealSize.x + 4 * BORDERSIZE + 2, pWindow->m_vRealSize.y + 4 * BORDERSIZE + 2}; + wlr_box damageBox = { pWindow->m_vRealPosition.x - BORDERSIZE - 1, pWindow->m_vRealPosition.y - BORDERSIZE - 1, pWindow->m_vRealSize.x + 2 * BORDERSIZE + 2, pWindow->m_vRealSize.y + 2 * BORDERSIZE + 2}; for (auto& m : g_pCompositor->m_lMonitors) wlr_output_damage_add_box(m.damage, &damageBox); }