From b1c17eacdb77003216ab4b7122c437e3326854f9 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Thu, 17 Mar 2005 01:21:13 +0000 Subject: [PATCH] glFinish() at the end of each frame; I'm seeing the "buffer swap with unfinished frame" issue at lower framerates when this isn't being done. (FYI, this doesn't fix choppiness with X11 driver, but helps a little bit.) --- stepmania/src/RageDisplay_OGL.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 6a71b28e17..85ce6a486f 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -797,6 +797,11 @@ bool RageDisplay_OGL::BeginFrame() void RageDisplay_OGL::EndFrame() { + // Give up the CPU to the OpenGL host if it wants it; in any case, make + // sure the frame is done. This helps graphics smoothness a lot by + // making sure we get the most out of each frame. + glFinish(); + wind->SwapBuffers(); ProcessStatsOnFlip(); }