mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 23:25:59 +01:00
render border with damage
This commit is contained in:
parent
908901fbda
commit
8e1abb6540
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue