Index: src/video/quartz/SDL_QuartzGL.m =================================================================== RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/quartz/SDL_QuartzGL.m,v retrieving revision 1.10 diff -u -r1.10 SDL_QuartzGL.m --- src/video/quartz/SDL_QuartzGL.m 6 Dec 2005 14:36:39 -0000 1.10 +++ src/video/quartz/SDL_QuartzGL.m 30 Jan 2006 18:15:34 -0000 @@ -56,6 +56,7 @@ NSOpenGLPixelFormat *fmt; int i = 0; int colorBits = bpp; + long value; /* if a GL library hasn't been loaded at this point, load the default. */ if (!this->gl_config.driver_loaded) { @@ -132,6 +133,14 @@ return 0; } + /* Synchronize QZ_GL_SwapBuffers() to vertical retrace. + * (Apple's documentation is not completely clear about what this setting + * exactly does, IMHO - for a detailed explanation see + * http://lists.apple.com/archives/mac-opengl/2006/Jan/msg00080.html ) + */ + value = 1; + [ gl_context setValues: &value forParameter: NSOpenGLCPSwapInterval ]; + /* * Wisdom from Apple engineer in reference to UT2003's OpenGL performance: * "You are blowing a couple of the internal OpenGL function caches. This