Added experimental MSAA for default framebuffer

To enable, add MSAA=4 to [Experimental] in colobot.ini and disable standard MSAA
dev-time-step
Tomasz Kapuściński 2016-03-14 20:14:16 +01:00
parent 2774fcd8a2
commit 3eadb0c6f7
1 changed files with 9 additions and 0 deletions

View File

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