- allow swapping the order of gl_finish and SwapBuffers calls, because some cards do not seem to like the correct order.

This commit is contained in:
Christoph Oelckers 2016-12-03 20:09:25 +01:00
parent 834802def3
commit daf1a40521

View file

@ -207,17 +207,20 @@ void OpenGLFrameBuffer::Update()
// //
//========================================================================== //==========================================================================
CVAR(Bool, gl_finishbeforeswap, false, 0);
void OpenGLFrameBuffer::Swap() void OpenGLFrameBuffer::Swap()
{ {
Finish.Reset(); Finish.Reset();
Finish.Clock(); Finish.Clock();
if (needsetgamma) if (gl_finishbeforeswap) glFinish();
if (needsetgamma)
{ {
//DoSetGamma(); //DoSetGamma();
needsetgamma = false; needsetgamma = false;
} }
SwapBuffers(); SwapBuffers();
glFinish(); if (!gl_finishbeforeswap) glFinish();
Finish.Unclock(); Finish.Unclock();
swapped = true; swapped = true;
FHardwareTexture::UnbindAll(); FHardwareTexture::UnbindAll();