From 41175dfccd442deb3e14340a75e487ebfd8d995b Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 7 Mar 2025 18:35:50 +0100 Subject: [PATCH] cogl: Replace unused field with computed value As in the commit mentioned below, we dropped the only place where current_gl_draw_buffer is set. Which was still being used for glx and ended up causing black screen with multi-monitors & nvidia. Fixes: aa0600bf2 ("cogl: Remove Framebuffer:stereo-mode") Part-of: --- cogl/cogl/cogl-context-private.h | 1 - cogl/cogl/winsys/cogl-onscreen-glx.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cogl/cogl/cogl-context-private.h b/cogl/cogl/cogl-context-private.h index 38f9a0b4b..f4ea792db 100644 --- a/cogl/cogl/cogl-context-private.h +++ b/cogl/cogl/cogl-context-private.h @@ -196,7 +196,6 @@ struct _CoglContext GLuint current_gl_program; gboolean current_gl_dither_enabled; - GLenum current_gl_draw_buffer; /* Clipping */ /* TRUE if we have a valid clipping stack flushed. In that case diff --git a/cogl/cogl/winsys/cogl-onscreen-glx.c b/cogl/cogl/winsys/cogl-onscreen-glx.c index 25e480559..c2df96e12 100644 --- a/cogl/cogl/winsys/cogl-onscreen-glx.c +++ b/cogl/cogl/winsys/cogl-onscreen-glx.c @@ -790,7 +790,7 @@ cogl_onscreen_glx_swap_region (CoglOnscreen *onscreen, rect[0], rect[1], x2, y2, GL_COLOR_BUFFER_BIT, GL_NEAREST); } - context->glDrawBuffer (context->current_gl_draw_buffer); + context->glDrawBuffer (GL_BACK); } /* NB: unlike glXSwapBuffers, glXCopySubBuffer and