videomenu: readd 16x MSAA option, check what we got after setting mode.

This commit is contained in:
svdijk 2014-05-01 20:52:25 +02:00
parent 7ace8c9116
commit 3bb9f49f19
2 changed files with 10 additions and 2 deletions

View file

@ -545,14 +545,14 @@ GLimp_InitGraphics(qboolean fullscreen)
{
msaa_samples = gl_msaa_samples->value;
if (SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1) == -1)
if (SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1) < 0)
{
Com_Printf("MSAA is unsupported: %s\n", SDL_GetError());
Cvar_SetValue ("gl_msaa_samples", 0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
}
else if (SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, msaa_samples) == -1)
else if (SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, msaa_samples) < 0)
{
Com_Printf("MSAA %ix is unsupported: %s\n", msaa_samples, SDL_GetError());
Cvar_SetValue("gl_msaa_samples", 0);
@ -620,6 +620,13 @@ GLimp_InitGraphics(qboolean fullscreen)
break;
}
}
if (gl_msaa_samples->value)
{
if (SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &msaa_samples) == 0)
{
Cvar_SetValue("gl_msaa_samples", msaa_samples);
}
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
/* For SDL2, these things must be done after creating the window */

View file

@ -250,6 +250,7 @@ VID_MenuInit(void)
"2x",
"4x",
"8x",
"16x",
0
};