Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzGL.m @ 1737:eacc5bc01d1c
Implemented bug #5
Added SDL_GL_ACCELERATED_VISUAL to guarantee hardware acceleration.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 27 Apr 2006 08:39:51 +0000 |
parents | 3b2a92126f4d |
children | acfd00fbff5c |
comparison
equal
deleted
inserted
replaced
1736:3b2a92126f4d | 1737:eacc5bc01d1c |
---|---|
108 | 108 |
109 if ( this->gl_config.multisamplesamples != 0 ) { | 109 if ( this->gl_config.multisamplesamples != 0 ) { |
110 attr[i++] = NSOpenGLPFASamples; | 110 attr[i++] = NSOpenGLPFASamples; |
111 attr[i++] = this->gl_config.multisamplesamples; | 111 attr[i++] = this->gl_config.multisamplesamples; |
112 attr[i++] = NSOpenGLPFANoRecovery; | 112 attr[i++] = NSOpenGLPFANoRecovery; |
113 } | |
114 | |
115 if ( this->gl_config.accelerated > 0 ) { | |
116 attr[i++] = NSOpenGLPFAAccelerated; | |
113 } | 117 } |
114 | 118 |
115 attr[i++] = NSOpenGLPFAScreenMask; | 119 attr[i++] = NSOpenGLPFAScreenMask; |
116 attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id); | 120 attr[i++] = CGDisplayIDToOpenGLDisplayMask (display_id); |
117 attr[i] = 0; | 121 attr[i] = 0; |
240 glGetIntegerv (GL_GREEN_BITS,&component); bits += component; | 244 glGetIntegerv (GL_GREEN_BITS,&component); bits += component; |
241 glGetIntegerv (GL_BLUE_BITS, &component); bits += component; | 245 glGetIntegerv (GL_BLUE_BITS, &component); bits += component; |
242 glGetIntegerv (GL_ALPHA_BITS, &component); bits += component; | 246 glGetIntegerv (GL_ALPHA_BITS, &component); bits += component; |
243 | 247 |
244 *value = bits; | 248 *value = bits; |
249 return 0; | |
245 } | 250 } |
246 return 0; | 251 case SDL_GL_ACCELERATED_VISUAL: |
252 { | |
253 long val; | |
254 [fmt getValues: &val forAttribute: NSOpenGLPFAAccelerated attr forVirtualScreen: 0]; | |
255 *value = val; | |
256 return 0; | |
257 } | |
258 case SDL_GL_SWAP_CONTROL: | |
259 { | |
260 long val; | |
261 [ gl_context getValues: &val forParameter: NSOpenGLCPSwapInterval ]; | |
262 *value = val; | |
263 return 0; | |
264 } | |
247 } | 265 } |
248 | 266 |
249 glGetIntegerv (attr, (GLint *)value); | 267 glGetIntegerv (attr, (GLint *)value); |
250 return 0; | 268 return 0; |
251 } | 269 } |