]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_screen.c
added buildnumber.c to makefile
[xonotic/darkplaces.git] / gl_screen.c
index 717a04fde41716e18ee81f39017f205512a1b472..43923c65ebd5e8a5338601505cfdb3506bf3816a 100644 (file)
@@ -796,11 +796,11 @@ void GL_BrightenScreen()
        glDisable(GL_TEXTURE_2D);
        glEnable(GL_BLEND);
        f = brightness.value = bound(1.0f, brightness.value, 5.0f);
-       if (f > 1)
+       if (f >= 1.01f)
        {
                glBlendFunc (GL_DST_COLOR, GL_ONE);
                glBegin (GL_TRIANGLES);
-               while (f > 1)
+               while (f >= 1.01f)
                {
                        if (f >= 2)
                                glColor3f (1, 1, 1);
@@ -815,7 +815,7 @@ void GL_BrightenScreen()
        }
        glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        contrast.value = bound(0.2, contrast.value, 1.0);
-       if (contrast.value < 1.0f)
+       if (contrast.value < 0.99f)
        {
                glBegin (GL_TRIANGLES);
                glColor4f (1, 1, 1, 1-contrast.value);
@@ -838,25 +838,18 @@ SCR_UpdateScreen
 This is called every frame, and can also be called explicitly to flush
 text to the screen.
 
-WARNING: be very careful calling this from elsewhere, because the refresh
-needs almost the entire 256k of stack space!
+LordHavoc: due to my rewrite of R_WorldNode, it no longer takes 256k of stack space :)
 ==================
 */
 extern cvar_t gl_vertexarrays;
 extern qboolean gl_arrays;
 void GL_Finish();
-int c_nodes;
 void SCR_UpdateScreen (void)
 {
        double  time1 = 0, time2;
 
        if (r_speeds.value)
-       {
                time1 = Sys_FloatTime ();
-               c_brush_polys = 0;
-               c_alias_polys = 0;
-               c_nodes = 0;
-       }
 
        if (!gl_arrays)
                gl_vertexarrays.value = 0;
@@ -899,7 +892,7 @@ void SCR_UpdateScreen (void)
        if (vid.recalc_refdef)
                SCR_CalcRefdef ();
 
-       glClearColor(0,0,0,0);
+       glClearColor(1,0,0,0);
        glClear (GL_COLOR_BUFFER_BIT); // LordHavoc: clear the screen (around the view as well)
 
 //
@@ -970,7 +963,7 @@ void SCR_UpdateScreen (void)
        if (r_speeds.value)
        {
                time2 = Sys_FloatTime ();
-               Con_Printf ("%3i ms  %4i wpoly %4i epoly %4i transpoly %4i BSPnodes\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys, currenttranspoly, c_nodes); 
+               Con_Printf ("%3i ms  %4i wpoly %4i epoly %4i transpoly %4i lightpoly %4i BSPnodes %4i BSPleafs\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys, currenttranspoly, c_light_polys, c_nodes, c_leafs);
        }
        GL_EndRendering ();
 }