src/video/quartz/SDL_QuartzGL.m
changeset 1736 3b2a92126f4d
parent 1403 376665398b25
child 1737 eacc5bc01d1c
     1.1 --- a/src/video/quartz/SDL_QuartzGL.m	Wed Apr 26 23:17:39 2006 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzGL.m	Thu Apr 27 07:59:16 2006 +0000
     1.3 @@ -132,6 +132,17 @@
     1.4          return 0;
     1.5      }
     1.6  
     1.7 +    /* Synchronize QZ_GL_SwapBuffers() to vertical retrace.
     1.8 +     * (Apple's documentation is not completely clear about what this setting
     1.9 +     * exactly does, IMHO - for a detailed explanation see
    1.10 +     * http://lists.apple.com/archives/mac-opengl/2006/Jan/msg00080.html )
    1.11 +     */
    1.12 +    if ( this->gl_config.swap_control >= 0 ) {
    1.13 +        long value;
    1.14 +        value = this->gl_config.swap_control;
    1.15 +        [ gl_context setValues: &value forParameter: NSOpenGLCPSwapInterval ];
    1.16 +    }
    1.17 +
    1.18      /*
    1.19       * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
    1.20       *  "You are blowing a couple of the internal OpenGL function caches. This