From 8e1abb6540cc8da9a8726a2dc4d2f2a9a6ee755f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 4 May 2022 15:16:50 +0200 Subject: [PATCH] render border with damage --- src/render/OpenGL.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index bb4cc97d..6109d2c6 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -631,7 +631,16 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CColor& col, int thick, i glEnableVertexAttribArray(m_shQUAD.posAttrib); 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); }