cvar_t gl_mesh_maxverts = {0, "gl_mesh_maxverts", "1024"};
cvar_t gl_mesh_floatcolors = {0, "gl_mesh_floatcolors", "1"};
cvar_t gl_mesh_drawrangeelements = {0, "gl_mesh_drawrangeelements", "1"};
+cvar_t gl_delayfinish = {CVAR_SAVE, "gl_delayfinish", "0"};
cvar_t r_render = {0, "r_render", "1"};
cvar_t gl_dither = {CVAR_SAVE, "gl_dither", "1"}; // whether or not to use dithering
break;
#endif
#ifdef GL_TABLE_TOO_LARGE
- case GL_TABLE_TOO_LARGE:
+ case GL_TABLE_TOO_LARGE:
Con_Printf("GL_TABLE_TOO_LARGE at %s:%i\n", filename, linenumber);
break;
#endif
Cvar_RegisterVariable(&r_render);
Cvar_RegisterVariable(&gl_dither);
Cvar_RegisterVariable(&gl_lockarrays);
+ Cvar_RegisterVariable(&gl_delayfinish);
#ifdef NORENDER
Cvar_SetValue("r_render", 0);
#endif
*/
void SCR_UpdateScreen (void)
{
- VID_Finish ();
+ if (gl_delayfinish.integer)
+ {
+ VID_Finish ();
- R_TimeReport("finish");
+ R_TimeReport("finish");
+ }
if (r_textureunits.integer > gl_textureunits)
Cvar_SetValueQuick(&r_textureunits, gl_textureunits);
// draw 2D stuff
R_DrawQueue();
- // tell driver to commit it's partially full geometry queue to the rendering queue
- // (this doesn't wait for the commands themselves to complete)
- qglFlush();
+ if (gl_delayfinish.integer)
+ {
+ // tell driver to commit it's partially full geometry queue to the rendering queue
+ // (this doesn't wait for the commands themselves to complete)
+ qglFlush();
+ }
+ else
+ {
+ VID_Finish ();
+
+ R_TimeReport("finish");
+ }
}