summaryrefslogtreecommitdiff
path: root/src/render/gl/GLFramebuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/gl/GLFramebuffer.cpp')
-rw-r--r--src/render/gl/GLFramebuffer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/render/gl/GLFramebuffer.cpp b/src/render/gl/GLFramebuffer.cpp
index d8b198c3..196f3327 100644
--- a/src/render/gl/GLFramebuffer.cpp
+++ b/src/render/gl/GLFramebuffer.cpp
@@ -171,4 +171,15 @@ void CGLFramebuffer::invalidate(const std::vector<GLenum>& attachments) {
return;
glInvalidateFramebuffer(GL_FRAMEBUFFER, attachments.size(), attachments.data());
+ m_cleared = false;
+}
+
+void CGLFramebuffer::clearAfterInvalidation() {
+ if (m_cleared)
+ return;
+
+ m_cleared = true;
+ glClearColor(0, 0, 0, 0);
+ g_pHyprOpenGL->scissor(nullptr);
+ glClear(GL_COLOR_BUFFER_BIT);
}