[gtk/wip/otte/glcontext] ngl: fbo 0 has no color attachment



commit b4b718c9457c5b8f6bc7f364bde1e50d04a232c3
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 8 02:28:49 2021 +0200

    ngl: fbo 0 has no color attachment
    
    Query the backbuffer instead.

 gsk/ngl/gsknglrenderjob.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index e3436e10f4..ace2ffcf0d 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -4071,7 +4071,10 @@ get_framebuffer_format (guint framebuffer)
   int size;
 
   glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
-  glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER,  GL_COLOR_ATTACHMENT0, 
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
+  glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER,
+                                         framebuffer ? GL_COLOR_ATTACHMENT0
+                                                     : GL_BACK,
+                                         GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
 
   if (size >= 32)
     return GL_RGBA32F;


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