render border with damage

This commit is contained in:
vaxerski 2022-05-04 15:16:50 +02:00
parent 908901fbda
commit 8e1abb6540

View file

@ -631,7 +631,16 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CColor& col, int thick, i
glEnableVertexAttribArray(m_shQUAD.posAttrib); glEnableVertexAttribArray(m_shQUAD.posAttrib);
glLineWidth(thick); glLineWidth(thick);
glDrawArrays(GL_LINE_STRIP, 0, 41);
// draw with damage
if (pixman_region32_not_empty(m_RenderData.pDamage)) {
PIXMAN_DAMAGE_FOREACH(m_RenderData.pDamage) {
const auto RECT = RECTSARR[i];
scissor(&RECT);
glDrawArrays(GL_LINE_STRIP, 0, 41);
}
}
glDisableVertexAttribArray(m_shQUAD.posAttrib); glDisableVertexAttribArray(m_shQUAD.posAttrib);
} }