#include "csprogs.h"
#include "cap_avi.h"
#include "cap_ogg.h"
-#include "dpsoftrast.h"
// we have to include snd_main.h here only to get access to snd_renderbuffer->format.speed when writing the AVI headers
#include "snd_main.h"
return;
CHECKGLERROR
- if (r_speeds.integer == 2 && qglFinish)
- qglFinish();
+ if (r_speeds.integer == 2)
+ GL_Finish();
CHECKGLERROR
r_timereport_temp = r_timereport_current;
r_timereport_current = Sys_DoubleTime();
}
if (r_viewscale_fpsscaling.integer)
- {
- switch(vid.renderpath)
- {
- case RENDERPATH_GL11:
- case RENDERPATH_GL13:
- case RENDERPATH_GL20:
- case RENDERPATH_GLES2:
- qglFinish();
- break;
- case RENDERPATH_D3D9:
- //Con_DPrintf("FIXME D3D9 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_D3D10:
- Con_DPrintf("FIXME D3D10 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_D3D11:
- Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_SOFT:
- DPSOFTRAST_Flush();
- break;
- }
- }
+ GL_Finish();
drawscreenstart = Sys_DoubleTime();
if (R_Stereo_Active())
{
else
SCR_DrawScreen();
if (r_viewscale_fpsscaling.integer)
- {
- switch(vid.renderpath)
- {
- case RENDERPATH_GL11:
- case RENDERPATH_GL13:
- case RENDERPATH_GL20:
- case RENDERPATH_GLES2:
- qglFinish();
- break;
- case RENDERPATH_D3D9:
- //Con_DPrintf("FIXME D3D9 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_D3D10:
- Con_DPrintf("FIXME D3D10 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_D3D11:
- Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
- break;
- case RENDERPATH_SOFT:
- DPSOFTRAST_Flush();
- break;
- }
- }
+ GL_Finish();
r_refdef.lastdrawscreentime = Sys_DoubleTime() - drawscreenstart;
SCR_CaptureVideo();
out[2] = v->z + (out[2] * iw + 1.0f) * v->depth * 0.5f;
}
+void GL_Finish(void)
+{
+ switch(vid.renderpath)
+ {
+ case RENDERPATH_GL11:
+ case RENDERPATH_GL13:
+ case RENDERPATH_GL20:
+ case RENDERPATH_GLES2:
+ qglFinish();
+ break;
+ case RENDERPATH_D3D9:
+ //Con_DPrintf("FIXME D3D9 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
+ case RENDERPATH_D3D10:
+ Con_DPrintf("FIXME D3D10 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
+ case RENDERPATH_D3D11:
+ Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
+ case RENDERPATH_SOFT:
+ DPSOFTRAST_Finish();
+ break;
+ }
+}
+
static int bboxedges[12][2] =
{
// top
void R_Viewport_InitRectSideView(r_viewport_t *v, const matrix4x4_t *cameramatrix, int side, int size, int border, float nearclip, float farclip, const float *nearplane);
void R_SetViewport(const r_viewport_t *v);
void R_GetViewport(r_viewport_t *v);
+void GL_Finish(void);
void GL_BlendFunc(int blendfunc1, int blendfunc2);
void GL_DepthMask(int state);
if (!vid_hidden)
{
- CHECKGLERROR
if (r_speeds.integer == 2 || gl_finish.integer)
- {
- qglFinish();CHECKGLERROR
- }
+ GL_Finish();
qaglSwapBuffers(context);
}
VID_UpdateGamma(false, GAMMA_TABLE_SIZE);
{
CHECKGLERROR
if (r_speeds.integer == 2 || gl_finish.integer)
- {
- qglFinish();CHECKGLERROR
- }
+ GL_Finish();
qglXSwapBuffers(vidx11_display, win);CHECKGLERROR
}
case RENDERPATH_GLES2:
CHECKGLERROR
if (r_speeds.integer == 2 || gl_finish.integer)
- {
- qglFinish();CHECKGLERROR
- }
+ GL_Finish();
#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2
#else
{
case RENDERPATH_D3D9:
case RENDERPATH_D3D10:
case RENDERPATH_D3D11:
+ if (r_speeds.integer == 2 || gl_finish.integer)
+ GL_Finish();
break;
}
}