This commit is contained in:
Rachael Alexanderson 2016-12-26 15:46:44 -05:00
commit d8df255438
6 changed files with 37 additions and 10 deletions

View file

@ -207,22 +207,25 @@ void OpenGLFrameBuffer::Update()
//
//==========================================================================
CVAR(Bool, gl_finishbeforeswap, false, 0);
CVAR(Bool, gl_finishbeforeswap, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
extern int camtexcount;
void OpenGLFrameBuffer::Swap()
{
bool swapbefore = gl_finishbeforeswap && camtexcount == 0;
Finish.Reset();
Finish.Clock();
if (gl_finishbeforeswap) glFinish();
if (swapbefore) glFinish();
if (needsetgamma)
{
//DoSetGamma();
needsetgamma = false;
}
SwapBuffers();
if (!gl_finishbeforeswap) glFinish();
if (!swapbefore) glFinish();
Finish.Unclock();
swapped = true;
camtexcount = 0;
FHardwareTexture::UnbindAll();
mDebug->Update();
}