src/video/quartz/SDL_QuartzGL.m
changeset 1736 3b2a92126f4d
parent 1403 376665398b25
child 1737 eacc5bc01d1c
equal deleted inserted replaced
1652:dc219ba4cf45 1736:3b2a92126f4d
   128     [ fmt release ];
   128     [ fmt release ];
   129 
   129 
   130     if (gl_context == nil) {
   130     if (gl_context == nil) {
   131         SDL_SetError ("Failed creating OpenGL context");
   131         SDL_SetError ("Failed creating OpenGL context");
   132         return 0;
   132         return 0;
       
   133     }
       
   134 
       
   135     /* Synchronize QZ_GL_SwapBuffers() to vertical retrace.
       
   136      * (Apple's documentation is not completely clear about what this setting
       
   137      * exactly does, IMHO - for a detailed explanation see
       
   138      * http://lists.apple.com/archives/mac-opengl/2006/Jan/msg00080.html )
       
   139      */
       
   140     if ( this->gl_config.swap_control >= 0 ) {
       
   141         long value;
       
   142         value = this->gl_config.swap_control;
       
   143         [ gl_context setValues: &value forParameter: NSOpenGLCPSwapInterval ];
   133     }
   144     }
   134 
   145 
   135     /*
   146     /*
   136      * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
   147      * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
   137      *  "You are blowing a couple of the internal OpenGL function caches. This
   148      *  "You are blowing a couple of the internal OpenGL function caches. This