all: chase hyprland opengl render fn changes (#437)

This commit is contained in:
Fridella 2025-08-01 18:53:41 +07:00 committed by GitHub
parent bf310cda4a
commit 827a1815b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 10 deletions

View File

@ -137,8 +137,12 @@ void CBordersPlusPlus::drawPass(PHLMONITOR pMonitor, const float& a) {
g_pHyprOpenGL->scissor(nullptr);
g_pHyprOpenGL->renderBorder(fullBox, CHyprColor{(uint64_t)**PCOLORS[i]}, **PNATURALROUND ? ORIGINALROUND : rounding, ROUNDINGPOWER, THISBORDERSIZE, a,
**PNATURALROUND ? ORIGINALROUND : -1);
g_pHyprOpenGL->renderBorder(fullBox, CHyprColor{(uint64_t)**PCOLORS[i]},
{.round = **PNATURALROUND ? ORIGINALROUND : rounding,
.roundingPower = ROUNDINGPOWER,
.borderSize = THISBORDERSIZE,
.a = a,
.outerRound = **PNATURALROUND ? ORIGINALROUND : -1});
}
m_seExtents = {{fullThickness, fullThickness}, {fullThickness, fullThickness}};

View File

@ -525,7 +525,7 @@ void CHyprBar::renderBarButtonsText(CBox* barBox, const float scale, const float
scaledButtonSize};
if (!**PICONONHOVER || (**PICONONHOVER && m_iButtonHoverState > 0))
g_pHyprOpenGL->renderTexture(button.iconTex, pos, a);
g_pHyprOpenGL->renderTexture(button.iconTex, pos, {.a = a});
offset += scaledButtonsPad + scaledButtonSize;
bool currentBit = (m_iButtonHoverState & (1 << i)) != 0;
@ -635,7 +635,7 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
windowBox.translate(WORKSPACEOFFSET).scale(pMonitor->m_scale).round();
g_pHyprOpenGL->renderRect(windowBox, CHyprColor(0, 0, 0, 0), scaledRounding, m_pWindow->roundingPower());
g_pHyprOpenGL->renderRect(windowBox, CHyprColor(0, 0, 0, 0), {.round = scaledRounding, .roundingPower = m_pWindow->roundingPower()});
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glStencilFunc(GL_NOTEQUAL, 1, -1);
@ -643,9 +643,9 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
}
if (SHOULDBLUR)
g_pHyprOpenGL->renderRectWithBlur(titleBarBox, color, scaledRounding, m_pWindow->roundingPower(), a);
g_pHyprOpenGL->renderRect(titleBarBox, color, {.round = scaledRounding, .roundingPower = m_pWindow->roundingPower(), .blur = true, .blurA = a});
else
g_pHyprOpenGL->renderRect(titleBarBox, color, scaledRounding, m_pWindow->roundingPower());
g_pHyprOpenGL->renderRect(titleBarBox, color, {.round = scaledRounding, .roundingPower = m_pWindow->roundingPower()});
// render title
if (**PENABLETITLE && (m_szLastTitle != PWINDOW->m_title || m_bWindowSizeChanged || m_pTextTex->m_texID == 0 || m_bTitleColorChanged)) {
@ -664,14 +664,14 @@ void CHyprBar::renderPass(PHLMONITOR pMonitor, const float& a) {
CBox textBox = {titleBarBox.x, titleBarBox.y, (int)BARBUF.x, (int)BARBUF.y};
if (**PENABLETITLE)
g_pHyprOpenGL->renderTexture(m_pTextTex, textBox, a);
g_pHyprOpenGL->renderTexture(m_pTextTex, textBox, {.a = a});
if (m_bButtonsDirty || m_bWindowSizeChanged) {
renderBarButtons(BARBUF, pMonitor->m_scale);
m_bButtonsDirty = false;
}
g_pHyprOpenGL->renderTexture(m_pButtonsTex, textBox, a);
g_pHyprOpenGL->renderTexture(m_pButtonsTex, textBox, {.a = a});
g_pHyprOpenGL->scissor(nullptr);

View File

@ -446,7 +446,7 @@ void COverview::fullRender() {
texbox.scale(pMonitor->m_scale).translate(pos->value());
texbox.round();
CRegion damage{0, 0, INT16_MAX, INT16_MAX};
g_pHyprOpenGL->renderTextureInternalWithDamage(images[x + y * SIDE_LENGTH].fb.getTexture(), texbox, 1.0, damage);
g_pHyprOpenGL->renderTextureInternal(images[x + y * SIDE_LENGTH].fb.getTexture(), texbox, {.damage = &damage, .a = 1.0});
}
}
}

View File

@ -120,7 +120,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
g_pHyprOpenGL->renderRect(wlrbox, CHyprColor(0, 0, 0, 0), PWINDOW->rounding() * pMonitor->m_scale, PWINDOW->roundingPower());
g_pHyprOpenGL->renderRect(wlrbox, CHyprColor(0, 0, 0, 0), {.round = PWINDOW->rounding() * pMonitor->m_scale, .roundingPower = PWINDOW->roundingPower()});
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glStencilFunc(GL_NOTEQUAL, 1, -1);