|
|
|
@@ -229,7 +229,6 @@ void CHyprOpenGLImpl::initShaders() {
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shQUAD.topLeft = glGetUniformLocation(prog, "topLeft");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shQUAD.fullSize = glGetUniformLocation(prog, "fullSize");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shQUAD.radius = glGetUniformLocation(prog, "radius");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shQUAD.primitiveMultisample = glGetUniformLocation(prog, "primitiveMultisample");
|
|
|
|
|
|
|
|
|
|
prog = createProgram(TEXVERTSRC, TEXFRAGSRCRGBA);
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.program = prog;
|
|
|
|
@@ -244,7 +243,6 @@ void CHyprOpenGLImpl::initShaders() {
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.topLeft = glGetUniformLocation(prog, "topLeft");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.fullSize = glGetUniformLocation(prog, "fullSize");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.radius = glGetUniformLocation(prog, "radius");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.primitiveMultisample = glGetUniformLocation(prog, "primitiveMultisample");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.applyTint = glGetUniformLocation(prog, "applyTint");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBA.tint = glGetUniformLocation(prog, "tint");
|
|
|
|
|
|
|
|
|
@@ -278,7 +276,6 @@ void CHyprOpenGLImpl::initShaders() {
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.topLeft = glGetUniformLocation(prog, "topLeft");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.fullSize = glGetUniformLocation(prog, "fullSize");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.radius = glGetUniformLocation(prog, "radius");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.primitiveMultisample = glGetUniformLocation(prog, "primitiveMultisample");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.applyTint = glGetUniformLocation(prog, "applyTint");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shRGBX.tint = glGetUniformLocation(prog, "tint");
|
|
|
|
|
|
|
|
|
@@ -295,7 +292,6 @@ void CHyprOpenGLImpl::initShaders() {
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.topLeft = glGetUniformLocation(prog, "topLeft");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.fullSize = glGetUniformLocation(prog, "fullSize");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.radius = glGetUniformLocation(prog, "radius");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.primitiveMultisample = glGetUniformLocation(prog, "primitiveMultisample");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.applyTint = glGetUniformLocation(prog, "applyTint");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shEXT.tint = glGetUniformLocation(prog, "tint");
|
|
|
|
|
|
|
|
|
@@ -353,7 +349,6 @@ void CHyprOpenGLImpl::initShaders() {
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.fullSize = glGetUniformLocation(prog, "fullSize");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.fullSizeUntransformed = glGetUniformLocation(prog, "fullSizeUntransformed");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.radius = glGetUniformLocation(prog, "radius");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.primitiveMultisample = glGetUniformLocation(prog, "primitiveMultisample");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.gradient = glGetUniformLocation(prog, "gradient");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.gradientLength = glGetUniformLocation(prog, "gradientLength");
|
|
|
|
|
m_RenderData.pCurrentMonData->m_shBORDER1.angle = glGetUniformLocation(prog, "angle");
|
|
|
|
@@ -560,13 +555,10 @@ void CHyprOpenGLImpl::renderRectWithDamage(wlr_box* box, const CColor& col, CReg
|
|
|
|
|
const auto TOPLEFT = Vector2D(transformedBox.x, transformedBox.y);
|
|
|
|
|
const auto FULLSIZE = Vector2D(transformedBox.width, transformedBox.height);
|
|
|
|
|
|
|
|
|
|
static auto* const PMULTISAMPLEEDGES = &g_pConfigManager->getConfigValuePtr("decoration:multisample_edges")->intValue;
|
|
|
|
|
|
|
|
|
|
// Rounded corners
|
|
|
|
|
glUniform2f(m_RenderData.pCurrentMonData->m_shQUAD.topLeft, (float)TOPLEFT.x, (float)TOPLEFT.y);
|
|
|
|
|
glUniform2f(m_RenderData.pCurrentMonData->m_shQUAD.fullSize, (float)FULLSIZE.x, (float)FULLSIZE.y);
|
|
|
|
|
glUniform1f(m_RenderData.pCurrentMonData->m_shQUAD.radius, round);
|
|
|
|
|
glUniform1i(m_RenderData.pCurrentMonData->m_shQUAD.primitiveMultisample, (int)(*PMULTISAMPLEEDGES == 1 && round != 0));
|
|
|
|
|
|
|
|
|
|
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shQUAD.posAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
|
|
|
|
|
|
|
|
@@ -717,14 +709,12 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b
|
|
|
|
|
|
|
|
|
|
const auto TOPLEFT = Vector2D(transformedBox.x, transformedBox.y);
|
|
|
|
|
const auto FULLSIZE = Vector2D(transformedBox.width, transformedBox.height);
|
|
|
|
|
static auto* const PMULTISAMPLEEDGES = &g_pConfigManager->getConfigValuePtr("decoration:multisample_edges")->intValue;
|
|
|
|
|
|
|
|
|
|
if (!usingFinalShader) {
|
|
|
|
|
// Rounded corners
|
|
|
|
|
glUniform2f(shader->topLeft, TOPLEFT.x, TOPLEFT.y);
|
|
|
|
|
glUniform2f(shader->fullSize, FULLSIZE.x, FULLSIZE.y);
|
|
|
|
|
glUniform1f(shader->radius, round);
|
|
|
|
|
glUniform1i(shader->primitiveMultisample, (int)(*PMULTISAMPLEEDGES == 1 && round != 0 && !noAA));
|
|
|
|
|
|
|
|
|
|
if (allowDim && m_pCurrentWindow && *PDIMINACTIVE) {
|
|
|
|
|
glUniform1i(shader->applyTint, 1);
|
|
|
|
@@ -1312,8 +1302,6 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CGradientValueData& grad,
|
|
|
|
|
if (m_RenderData.damage.empty() || (m_pCurrentWindow && m_pCurrentWindow->m_sAdditionalConfigData.forceNoBorder))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
static auto* const PMULTISAMPLE = &g_pConfigManager->getConfigValuePtr("decoration:multisample_edges")->intValue;
|
|
|
|
|
|
|
|
|
|
wlr_box newBox = *box;
|
|
|
|
|
scaleBox(&newBox, m_RenderData.renderModif.scale);
|
|
|
|
|
newBox.x += m_RenderData.renderModif.translate.x;
|
|
|
|
@@ -1372,7 +1360,6 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CGradientValueData& grad,
|
|
|
|
|
glUniform2f(m_RenderData.pCurrentMonData->m_shBORDER1.fullSizeUntransformed, (float)box->width, (float)box->height);
|
|
|
|
|
glUniform1f(m_RenderData.pCurrentMonData->m_shBORDER1.radius, round);
|
|
|
|
|
glUniform1f(m_RenderData.pCurrentMonData->m_shBORDER1.thick, scaledBorderSize);
|
|
|
|
|
glUniform1i(m_RenderData.pCurrentMonData->m_shBORDER1.primitiveMultisample, *PMULTISAMPLE);
|
|
|
|
|
|
|
|
|
|
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shBORDER1.posAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
|
|
|
|
glVertexAttribPointer(m_RenderData.pCurrentMonData->m_shBORDER1.texAttrib, 2, GL_FLOAT, GL_FALSE, 0, fullVerts);
|
|
|
|
|