mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 16:50:48 +00:00
GL cleanup. (cleanup after Endy mainly)
This commit is contained in:
parent
fa7a67e9fb
commit
0b826825ec
4 changed files with 89 additions and 132 deletions
|
@ -512,28 +512,34 @@ R_TimeRefresh_f
|
|||
For program optimization
|
||||
====================
|
||||
*/
|
||||
// LordHavoc: improved appearance and accuracy of timerefresh
|
||||
void R_TimeRefresh_f (void)
|
||||
{
|
||||
int i;
|
||||
float start, stop, time;
|
||||
double start, stop, time;
|
||||
|
||||
glDrawBuffer (GL_FRONT);
|
||||
// glDrawBuffer (GL_FRONT);
|
||||
glFinish ();
|
||||
GL_EndRendering ();
|
||||
|
||||
start = Sys_DoubleTime ();
|
||||
for (i=0 ; i<128 ; i++)
|
||||
{
|
||||
GL_BeginRendering();
|
||||
r_refdef.viewangles[1] = i/128.0*360.0;
|
||||
R_RenderView ();
|
||||
glFinish ();
|
||||
GL_EndRendering ();
|
||||
}
|
||||
|
||||
glFinish ();
|
||||
// glFinish ();
|
||||
stop = Sys_DoubleTime ();
|
||||
time = stop-start;
|
||||
Con_Printf ("%f seconds (%f fps)\n", time, 128/time);
|
||||
|
||||
glDrawBuffer (GL_BACK);
|
||||
GL_EndRendering ();
|
||||
// glDrawBuffer (GL_BACK);
|
||||
// GL_EndRendering ();
|
||||
GL_BeginRendering();
|
||||
}
|
||||
|
||||
void D_FlushCaches (void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue