May fix Dabb's statusbar problem

This commit is contained in:
Joseph Carter 2000-06-04 10:53:01 +00:00
parent 54fecba24b
commit 1cb3f49391
2 changed files with 19 additions and 19 deletions

View file

@ -1165,27 +1165,16 @@ r_refdef must be set before the first call
*/ */
void R_RenderView (void) void R_RenderView (void)
{ {
double time1 = 0, time2;
if (r_norefresh->value) if (r_norefresh->value)
return; return;
if (!r_worldentity.model || !cl.worldmodel) if (!r_worldentity.model || !cl.worldmodel)
Sys_Error ("R_RenderView: NULL worldmodel"); Sys_Error ("R_RenderView: NULL worldmodel");
if (r_speeds->value) glFinish ();
{
glFinish ();
time1 = Sys_DoubleTime ();
c_brush_polys = 0;
c_alias_polys = 0;
}
mirror = false; mirror = false;
if (gl_finish->value)
glFinish ();
R_Clear (); R_Clear ();
// render normal view // render normal view
@ -1197,11 +1186,4 @@ void R_RenderView (void)
// R_Mirror (); // R_Mirror ();
R_PolyBlend (); R_PolyBlend ();
if (r_speeds->value)
{
// glFinish ();
time2 = Sys_DoubleTime ();
Con_Printf ("%3i ms %4i wpoly %4i epoly\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys);
}
} }

View file

@ -1129,6 +1129,8 @@ needs almost the entire 256k of stack space!
*/ */
void SCR_UpdateScreen (void) void SCR_UpdateScreen (void)
{ {
double time1 = 0, time2;
if (block_drawing) if (block_drawing)
return; return;
@ -1159,6 +1161,13 @@ void SCR_UpdateScreen (void)
GL_BeginRendering (&glx, &gly, &glwidth, &glheight); GL_BeginRendering (&glx, &gly, &glwidth, &glheight);
if (r_speeds->value)
{
time1 = Sys_DoubleTime ();
c_brush_polys = 0;
c_alias_polys = 0;
}
// //
// determine size of refresh window // determine size of refresh window
// //
@ -1241,5 +1250,14 @@ void SCR_UpdateScreen (void)
V_UpdatePalette (); V_UpdatePalette ();
if (r_speeds->value)
{
// glFinish ();
time2 = Sys_DoubleTime ();
Con_Printf ("%3i ms %4i wpoly %4i epoly\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys);
}
glFinish ();
GL_EndRendering (); GL_EndRendering ();
} }