From 53c32cc5a45d3900f58a382fc3a1fb4d63338277 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 19 Jul 2018 23:33:26 +1000 Subject: [PATCH] [client] enable multisampling --- client/renderers/opengl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/renderers/opengl.c b/client/renderers/opengl.c index 3cb1f0aa..f0ab0a36 100644 --- a/client/renderers/opengl.c +++ b/client/renderers/opengl.c @@ -177,7 +177,9 @@ bool opengl_initialize(void * opaque, Uint32 * sdlFlags) return false; *sdlFlags = SDL_WINDOW_OPENGL; - SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER , 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); return true; } @@ -712,6 +714,8 @@ static bool pre_configure(struct Inst * this, SDL_Window *window) } } + glEnable(GL_MULTISAMPLE); + SDL_GL_SetSwapInterval(this->opt.vsync ? 1 : 0); this->preConfigured = true; return true;