gl_screen.c: Minor tweaks, contrast gets clamped to 0.1-1 instead of 0.2-1

view.h: Add brightness, contrast cvars as extern
menu.c: Change brightness scroller to use the brightness cvar, add
contrast scroller.
r_view, sw_view.c: Add brightness/contrast cvars to software, and make
them work.
This commit is contained in:
Jeff Teunissen 2000-09-20 04:06:12 +00:00
parent 3396ca6fde
commit a3e19d5cc2
5 changed files with 163 additions and 179 deletions

View file

@ -1264,20 +1264,19 @@ void SCR_UpdateScreen (void)
glEnd ();
}
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
contrast->value = bound(0.2, contrast->value, 1.0);
contrast->value = bound(0.1, contrast->value, 1.0);
if ((gl_polyblend->value && v_blend[3]) || contrast->value < 1)
{
glBegin (GL_QUADS);
if (contrast->value < 1)
{
glColor4f (1, 1, 1, 1-contrast->value);
if (contrast->value < 1) {
glColor4f (1, 1, 1, (1 - contrast->value));
glVertex2f (0,0);
glVertex2f (vid.width, 0);
glVertex2f (vid.width, vid.height);
glVertex2f (0, vid.height);
}
if (gl_polyblend->value && v_blend[3])
{
if (gl_polyblend->value && v_blend[3]) {
glColor4fv (v_blend);
glVertex2f (0,0);
glVertex2f (vid.width, 0);