comparison src/video/quartz/SDL_QuartzGL.m @ 1736:3b2a92126f4d

Implemented bug #2, 117: Date: Mon, 21 Mar 2005 12:06:14 +0100 From: Per Inge Mathisen Subject: Re: [SDL] Outstanding patches? The patch adds support for setting SDL_GL_SWAP_CONTROL to Windows and X11. In Windows you can also query this enum to check that it is working, or see what the default is - such functionality does not exist in GLX. For more information on the standards implemented: http://oss.sgi.com/projects/ogl-sample/registry/SGI/swap_control.txt http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Apr 2006 07:59:16 +0000
parents 376665398b25
children eacc5bc01d1c
comparison
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