Clamp gl_overbrightbits to 0, 1, 2 or 4.

Most (all?) GPUs / OpenGL implementation doen't support more
This commit is contained in:
Yamagi Burmeister 2016-08-06 15:39:46 +02:00
parent 698e2a26ba
commit a2400bc145
1 changed files with 15 additions and 0 deletions

View File

@ -1663,6 +1663,21 @@ R_BeginFrame(float camera_separation)
}
}
// Clamp overbrightbits
if (gl_overbrightbits->modified)
{
if (gl_overbrightbits->value > 2 && gl_overbrightbits->value < 4)
{
Cvar_Set("gl_overbrightbits", "2");
}
else if (gl_overbrightbits->value > 4)
{
Cvar_Set("gl_overbrightbits", "4");
}
gl_overbrightbits->modified = false;
}
/* go into 2D mode */
int x, w, y, h;