From 78b1f64a616321ce7c7dbb2206f8b817c66aabe1 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 3 Jan 2021 23:29:34 -0500 Subject: [PATCH] [client] require 8 bit colour when creating OpenGL context For some reason, if we don't ask for 8-bit, wayland will give a context with lower bit depth, which looks terrible. --- client/renderers/OpenGL/opengl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/renderers/OpenGL/opengl.c b/client/renderers/OpenGL/opengl.c index 4a60598d..ed1ff659 100644 --- a/client/renderers/OpenGL/opengl.c +++ b/client/renderers/OpenGL/opengl.c @@ -261,6 +261,9 @@ bool opengl_initialize(void * opaque, Uint32 * sdlFlags) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER , 1); SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); + SDL_GL_SetAttribute(SDL_GL_RED_SIZE , 8); + SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE , 8); + SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE , 8); return true; }