diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-07-31 16:23:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 16:23:09 +0200 |
| commit | a907ecd4ff736a3a09410532b405a437eb48033c (patch) | |
| tree | 6e7ed001c06f224245ecf9c5e0c8206d6acd408f /src/render/decorations/CHyprDropShadowDecoration.cpp | |
| parent | 3e35797b18d35baae82657bb0438af88156e273f (diff) | |
opengl: improve render fn arg clarity (#11286)
Diffstat (limited to 'src/render/decorations/CHyprDropShadowDecoration.cpp')
| -rw-r--r-- | src/render/decorations/CHyprDropShadowDecoration.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index fa77a343..d09d4a83 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -189,18 +189,19 @@ void CHyprDropShadowDecoration::render(PHLMONITOR pMonitor, float const& a) { // build the matte // 10-bit formats have dogshit alpha channels, so we have to use the matte to its fullest. // first, clear region of interest with black (fully transparent) - g_pHyprOpenGL->renderRect(fullBox, CHyprColor(0, 0, 0, 1), 0); + g_pHyprOpenGL->renderRect(fullBox, CHyprColor(0, 0, 0, 1), {.round = 0}); // render white shadow with the alpha of the shadow color (otherwise we clear with alpha later and shit it to 2 bit) drawShadowInternal(fullBox, ROUNDING * pMonitor->m_scale, ROUNDINGPOWER, *PSHADOWSIZE * pMonitor->m_scale, CHyprColor(1, 1, 1, PWINDOW->m_realShadowColor->value().a), a); // render black window box ("clip") - g_pHyprOpenGL->renderRect(windowBox, CHyprColor(0, 0, 0, 1.0), (ROUNDING + 1 /* This fixes small pixel gaps. */) * pMonitor->m_scale, ROUNDINGPOWER); + g_pHyprOpenGL->renderRect(windowBox, CHyprColor(0, 0, 0, 1.0), + {.round = (ROUNDING + 1 /* This fixes small pixel gaps. */) * pMonitor->m_scale, .roundingPower = ROUNDINGPOWER}); alphaSwapFB.bind(); // alpha swap just has the shadow color. It will be the "texture" to render. - g_pHyprOpenGL->renderRect(fullBox, PWINDOW->m_realShadowColor->value().stripA(), 0); + g_pHyprOpenGL->renderRect(fullBox, PWINDOW->m_realShadowColor->value().stripA(), {.round = 0}); LASTFB->bind(); @@ -237,7 +238,7 @@ void CHyprDropShadowDecoration::drawShadowInternal(const CBox& box, int round, f color.a *= a; if (*PSHADOWSHARP) - g_pHyprOpenGL->renderRect(box, color, round, roundingPower); + g_pHyprOpenGL->renderRect(box, color, {.round = round, .roundingPower = roundingPower}); else g_pHyprOpenGL->renderRoundedShadow(box, round, roundingPower, range, color, 1.F); } |
