diff --git a/libs/video/renderer/gl/gl_lightmap.c b/libs/video/renderer/gl/gl_lightmap.c index 343398cf2..9a04a6ed4 100644 --- a/libs/video/renderer/gl/gl_lightmap.c +++ b/libs/video/renderer/gl/gl_lightmap.c @@ -75,7 +75,7 @@ qboolean lightmap_modified[MAX_GLTEXTURES]; glpoly_t *lightmap_polys[MAX_LIGHTMAPS]; glRect_t lightmap_rectchange[MAX_LIGHTMAPS]; -static int lshift, lshift2; +static int lshift = 8, lshift2 = 9; void (*R_BuildLightMap) (msurface_t *surf); @@ -555,7 +555,7 @@ gl_overbright_f (cvar_t *var) if (!var) return; - if (R_BuildLightMap == 0) + if (!R_BuildLightMap) return; switch (var->int_val) { diff --git a/libs/video/targets/vid_common_gl.c b/libs/video/targets/vid_common_gl.c index 6c6bc84de..6e677f635 100644 --- a/libs/video/targets/vid_common_gl.c +++ b/libs/video/targets/vid_common_gl.c @@ -47,6 +47,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "QF/input.h" #include "QF/qargs.h" #include "QF/quakefs.h" +#include "r_cvar.h" // FIXME: for gl_overbright_f #include "QF/sys.h" #include "QF/va.h" #include "QF/vid.h" @@ -157,6 +158,8 @@ gl_doublebright_f (cvar_t *var) lm_src_blend = GL_ZERO; lm_dest_blend = GL_SRC_COLOR; } + if (gl_overbright) + gl_overbright_f (gl_overbright); } static void