From 203ebc73ebdf47f8db533f3dfacf79ad632fb585 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 2 Jul 2021 21:45:12 +1000 Subject: [PATCH] [client] x11/opengl: enable double buffering for OpenGL Drawing to the front buffer directly requires special handling to prevent seeing the draw progress (avoiding glClear, etc) and as a result the output is quite bad unless a compositor is running. Also vsync if enabled will not function without double buffering enabled. As OpenGL is the legacy fallback, there are no plans to implement clean front buffer draw support, so just enable double buffering. --- client/displayservers/X11/x11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index b070bcec..6c694bfd 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -118,11 +118,13 @@ static bool x11Init(const LG_DSInitParams params) GLint glXAttribs[] = { GLX_RGBA, + GLX_DOUBLEBUFFER , GLX_DEPTH_SIZE , 24, GLX_STENCIL_SIZE , 0, GLX_RED_SIZE , 8, GLX_GREEN_SIZE , 8, GLX_BLUE_SIZE , 8, + GLX_DEPTH_SIZE , 0, GLX_SAMPLE_BUFFERS, 0, GLX_SAMPLES , 0, None