- added CVAR to disable WGL_EXT_swap_control_tear.

At least on faster NVidia hardware, setting this to false and gl_finishbeforeswap to true gives a better experience because it reduces screen tearing - but the same setting will reduce frame rate quite dramatically on Intel and can cause bad stalls on some older GPUs when rendering camera textures.
This commit is contained in:
Christoph Oelckers 2018-05-19 19:18:38 +02:00
parent f54cf561ab
commit cc65490062
1 changed files with 6 additions and 1 deletions

View File

@ -1159,10 +1159,15 @@ bool SystemFrameBuffer::IsFullscreen()
//
//
//==========================================================================
EXTERN_CVAR(Bool, vid_vsync);
CUSTOM_CVAR(Bool, gl_control_tear, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
vid_vsync.Callback();
}
void SystemFrameBuffer::SetVSync (bool vsync)
{
if (myWglSwapIntervalExtProc != NULL) myWglSwapIntervalExtProc(vsync ? SwapInterval : 0);
if (myWglSwapIntervalExtProc != NULL) myWglSwapIntervalExtProc(vsync ? (gl_control_tear? SwapInterval : 1) : 0);
}
void SystemFrameBuffer::SwapBuffers()