mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
videomenu: readd 16x MSAA option, check what we got after setting mode.
This commit is contained in:
parent
7ace8c9116
commit
3bb9f49f19
2 changed files with 10 additions and 2 deletions
|
@ -545,14 +545,14 @@ GLimp_InitGraphics(qboolean fullscreen)
|
||||||
{
|
{
|
||||||
msaa_samples = gl_msaa_samples->value;
|
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());
|
Com_Printf("MSAA is unsupported: %s\n", SDL_GetError());
|
||||||
Cvar_SetValue ("gl_msaa_samples", 0);
|
Cvar_SetValue ("gl_msaa_samples", 0);
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
|
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 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());
|
Com_Printf("MSAA %ix is unsupported: %s\n", msaa_samples, SDL_GetError());
|
||||||
Cvar_SetValue("gl_msaa_samples", 0);
|
Cvar_SetValue("gl_msaa_samples", 0);
|
||||||
|
@ -620,6 +620,13 @@ GLimp_InitGraphics(qboolean fullscreen)
|
||||||
break;
|
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)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
/* For SDL2, these things must be done after creating the window */
|
/* For SDL2, these things must be done after creating the window */
|
||||||
|
|
|
@ -250,6 +250,7 @@ VID_MenuInit(void)
|
||||||
"2x",
|
"2x",
|
||||||
"4x",
|
"4x",
|
||||||
"8x",
|
"8x",
|
||||||
|
"16x",
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue