From 7f3318309b916b1c8e35eab30915f8a6cb94d267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BB=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=87?= Date: Sun, 10 May 2026 09:07:19 +0300 Subject: [PATCH] render/opengl/linux/glx: force GL_DRAW_BUFFER=GL_BACK after make-current --- src/render/opengl/linux/glx/render_opengl_linux_glx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/render/opengl/linux/glx/render_opengl_linux_glx.c b/src/render/opengl/linux/glx/render_opengl_linux_glx.c index fecdc4a4..993cdf32 100644 --- a/src/render/opengl/linux/glx/render_opengl_linux_glx.c +++ b/src/render/opengl/linux/glx/render_opengl_linux_glx.c @@ -106,6 +106,9 @@ r_ogl_os_select_window(WM_Window os, R_Handle r) { LNX_WM_Window *w = (LNX_WM_Window *)os.u64[0]; glXMakeCurrent(lnx_wm_state->display, w->window, r_ogl_lnx_ctx); + // ensure default framebuffer writes target the back buffer; on some drivers + // GL_DRAW_BUFFER stays GL_NONE if a context was first made current without a drawable. + glDrawBuffer(GL_BACK); } internal void