[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.
This commit is contained in:
Geoffrey McRae 2021-07-02 21:45:12 +10:00
parent d24b031fc5
commit 203ebc73eb

View file

@ -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