cvar_t scr_showturtle = {"showturtle","0"};
cvar_t scr_showpause = {"showpause","1"};
cvar_t scr_printspeed = {"scr_printspeed","8"};
-cvar_t gl_triplebuffer = {"gl_triplebuffer", "1", true };
+cvar_t showfps = {"showfps", "0", true};
extern cvar_t crosshair;
int clearconsole;
int clearnotify;
-int sb_lines;
+extern int sb_lines;
-viddef_t vid; // global video state
-
-vrect_t scr_vrect;
+extern viddef_t vid; // global video state
qboolean scr_disabled_for_loading;
qboolean scr_drawloading;
r_refdef.fov_x = scr_fov.value;
r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
-
- scr_vrect = r_refdef.vrect;
}
Cvar_RegisterVariable (&scr_showpause);
Cvar_RegisterVariable (&scr_centertime);
Cvar_RegisterVariable (&scr_printspeed);
- Cvar_RegisterVariable (&gl_triplebuffer);
+ Cvar_RegisterVariable (&showfps);
//
// register our commands
if (!r_cache_thrash)
return;
- Draw_Pic (scr_vrect.x+32, scr_vrect.y, scr_ram);
+ Draw_Pic (32, 0, scr_ram);
}
/*
if (count < 3)
return;
- Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
+ Draw_Pic (0, 0, scr_turtle);
}
/*
if (cls.demoplayback)
return;
- Draw_Pic (scr_vrect.x+64, scr_vrect.y, scr_net);
+ Draw_Pic (64, 0, scr_net);
}
/*
if (scr_conlines < scr_con_current)
scr_con_current = scr_conlines;
}
-
- /*
- if (clearconsole++ < vid.numpages)
- {
- Sbar_Changed ();
- }
- else if (clearnotify++ < vid.numpages)
- {
- }
- else
- con_notifylines = 0;
- */
}
/*
int c_nodes;
void SCR_UpdateScreen (void)
{
- static float oldscr_viewsize;
- double time1, time2;
+ double time1 = 0, time2;
if (r_speeds.value)
{
if (!gl_arrays)
gl_vertexarrays.value = 0;
- vid.numpages = 2 + gl_triplebuffer.value;
-
scr_copytop = 0;
scr_copyeverything = 0;
else
{
if (crosshair.value)
- Draw_Character (scr_vrect.x + scr_vrect.width/2, scr_vrect.y + scr_vrect.height/2, '+');
+ Draw_Character (r_refdef.vrect.x + r_refdef.vrect.width/2, r_refdef.vrect.y + r_refdef.vrect.height/2, '+');
SCR_DrawRam ();
SCR_DrawNet ();
M_Draw ();
}
+ if (showfps.value)
+ {
+ static double currtime;
+ double newtime;
+ char temp[32];
+ int calc;
+ newtime = Sys_FloatTime();
+ calc = (int) (100.0 / (newtime - currtime));
+ sprintf(temp, "% 4i.%02i fps", calc / 100, calc % 100);
+ currtime = newtime;
+ Draw_String(vid.width - (12*8), 0, temp, 9999);
+ }
+
V_UpdatePalette ();
GL_BrightenScreen();
if (r_speeds.value)
{
time2 = Sys_FloatTime ();
- Con_Printf ("%3i ms %4i wpoly %4i epoly %4i BSPnodes\n", (int)((time2-time1)*1000), c_brush_polys, c_alias_polys, c_nodes);
+ 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);
}
GL_EndRendering ();
}