[gtk/wip/chergert/glproto: 52/69] apply framebuffer from clear command




commit 423b77b67103cbb272de920b17dfc2bf5eb45c9f
Author: Christian Hergert <chergert redhat com>
Date:   Wed Dec 23 18:16:59 2020 -0800

    apply framebuffer from clear command

 gsk/next/gskglcommandqueue.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 5b9bec3664..8d56ffe9ef 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -902,6 +902,12 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self)
       switch (batch->kind)
         {
         case GSK_GL_COMMAND_KIND_CLEAR:
+          if (framebuffer != batch->clear.framebuffer)
+            {
+              framebuffer = batch->clear.framebuffer;
+              glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
+            }
+
           glClear (batch->clear.bits);
           break;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]