[gtk/wip/otte/glcontext: 1/7] ngl: fbo 0 has no color attachment
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/glcontext: 1/7] ngl: fbo 0 has no color attachment
- Date: Fri, 8 Oct 2021 01:31:19 +0000 (UTC)
commit 4f53645e5d6a232ca844e71a91f57f9d767d8a03
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]