opengl: improve render fn arg clarity (#11286)

This commit is contained in:
Vaxry 2025-07-31 16:23:09 +02:00 committed by GitHub
parent 3e35797b18
commit a907ecd4ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 269 additions and 168 deletions

View file

@ -116,14 +116,38 @@ void CSurfacePassElement::draw(const CRegion& damage) {
// to what we do for misaligned surfaces (blur the entire thing and then render shit without blur)
if (m_data.surfaceCounter == 0 && !m_data.popup) {
if (BLUR)
g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, windowBox, ALPHA, m_data.surface, rounding, roundingPower, m_data.blockBlurOptimization, m_data.fadeAlpha, OVERALL_ALPHA);
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox,
{
.surface = m_data.surface,
.a = ALPHA,
.blur = true,
.blurA = m_data.fadeAlpha,
.overallA = OVERALL_ALPHA,
.round = rounding,
.roundingPower = roundingPower,
.allowCustomUV = true,
.blockBlurOptimization = m_data.blockBlurOptimization,
});
else
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox, ALPHA * OVERALL_ALPHA, rounding, roundingPower, false, true);
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox,
{.a = ALPHA * OVERALL_ALPHA, .round = rounding, .roundingPower = roundingPower, .discardActive = false, .allowCustomUV = true});
} else {
if (BLUR && m_data.popup)
g_pHyprOpenGL->renderTextureWithBlur(TEXTURE, windowBox, ALPHA, m_data.surface, rounding, roundingPower, true, m_data.fadeAlpha, OVERALL_ALPHA);
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox,
{
.surface = m_data.surface,
.a = ALPHA,
.blur = true,
.blurA = m_data.fadeAlpha,
.overallA = OVERALL_ALPHA,
.round = rounding,
.roundingPower = roundingPower,
.allowCustomUV = true,
.blockBlurOptimization = true,
});
else
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox, ALPHA * OVERALL_ALPHA, rounding, roundingPower, false, true);
g_pHyprOpenGL->renderTexture(TEXTURE, windowBox,
{.a = ALPHA * OVERALL_ALPHA, .round = rounding, .roundingPower = roundingPower, .discardActive = false, .allowCustomUV = true});
}
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback)