From 3eadb0c6f750c82abd733f6575dcf521c309c6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Mon, 14 Mar 2016 20:14:16 +0100 Subject: [PATCH] Added experimental MSAA for default framebuffer To enable, add MSAA=4 to [Experimental] in colobot.ini and disable standard MSAA --- src/app/app.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/app.cpp b/src/app/app.cpp index d2dba1c6..5e91af9a 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -788,6 +788,15 @@ bool CApplication::CreateVideoSurface() } } + int msaa = 0; + if (GetConfigFile().GetIntProperty("Experimental", "MSAA", msaa)) + { + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, msaa); + + GetLogger()->Info("Using MSAA on default framebuffer (%d samples)\n", msaa); + } + /* If hardware acceleration specifically requested, this will force the hw accel and fail with error if not available */ if (m_deviceConfig.hardwareAccel)