mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- 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:
parent
f54cf561ab
commit
cc65490062
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
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()
|
void SystemFrameBuffer::SwapBuffers()
|
||||||
|
|
Loading…
Reference in a new issue