diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index 7102df72e..f20c9e502 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -207,17 +207,20 @@ void OpenGLFrameBuffer::Update() // //========================================================================== +CVAR(Bool, gl_finishbeforeswap, false, 0); + void OpenGLFrameBuffer::Swap() { Finish.Reset(); Finish.Clock(); - if (needsetgamma) + if (gl_finishbeforeswap) glFinish(); + if (needsetgamma) { //DoSetGamma(); needsetgamma = false; } SwapBuffers(); - glFinish(); + if (!gl_finishbeforeswap) glFinish(); Finish.Unclock(); swapped = true; FHardwareTexture::UnbindAll();