src/video/quartz/SDL_QuartzGL.m
branchSDL-1.2
changeset 4370 8d67936e32ec
parent 4204 976bc19f8f6b
child 6137 4720145f848b
equal deleted inserted replaced
4369:f14cf9d71233 4370:8d67936e32ec
   151      * (Apple's documentation is not completely clear about what this setting
   151      * (Apple's documentation is not completely clear about what this setting
   152      * exactly does, IMHO - for a detailed explanation see
   152      * exactly does, IMHO - for a detailed explanation see
   153      * http://lists.apple.com/archives/mac-opengl/2006/Jan/msg00080.html )
   153      * http://lists.apple.com/archives/mac-opengl/2006/Jan/msg00080.html )
   154      */
   154      */
   155     if ( this->gl_config.swap_control >= 0 ) {
   155     if ( this->gl_config.swap_control >= 0 ) {
   156         long value;
   156         GLint value;
   157         value = this->gl_config.swap_control;
   157         value = this->gl_config.swap_control;
   158         [ gl_context setValues: &value forParameter: NSOpenGLCPSwapInterval ];
   158         [ gl_context setValues: &value forParameter: NSOpenGLCPSwapInterval ];
   159     }
   159     }
   160 
   160 
   161     /*
   161     /*
   173     #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
   173     #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
   174     #define GLI_SUBMIT_FUNC_CACHE_MAX 280
   174     #define GLI_SUBMIT_FUNC_CACHE_MAX 280
   175     #endif
   175     #endif
   176 
   176 
   177     {
   177     {
   178         long cache_max = 64;
   178         GLint cache_max = 64;
   179         CGLContextObj ctx = QZ_GetCGLContextObj(gl_context);
   179         CGLContextObj ctx = QZ_GetCGLContextObj(gl_context);
   180         CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
   180         CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
   181         CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
   181         CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
   182     }
   182     }
   183 
   183 
   259             *value = bits;
   259             *value = bits;
   260             return 0;
   260             return 0;
   261         }
   261         }
   262         case SDL_GL_ACCELERATED_VISUAL:
   262         case SDL_GL_ACCELERATED_VISUAL:
   263         {
   263         {
   264             long val;
   264             GLint val;
   265 	    /* FIXME: How do we get this information here?
   265 	    /* FIXME: How do we get this information here?
   266             [fmt getValues: &val forAttribute: NSOpenGLPFAAccelerated attr forVirtualScreen: 0];
   266             [fmt getValues: &val forAttribute: NSOpenGLPFAAccelerated attr forVirtualScreen: 0];
   267 	    */
   267 	    */
   268 	    val = (this->gl_config.accelerated != 0);;
   268 	    val = (this->gl_config.accelerated != 0);;
   269             *value = val;
   269             *value = val;
   270             return 0;
   270             return 0;
   271         }
   271         }
   272         case SDL_GL_SWAP_CONTROL:
   272         case SDL_GL_SWAP_CONTROL:
   273         {
   273         {
   274             long val;
   274             GLint val;
   275             [ gl_context getValues: &val forParameter: NSOpenGLCPSwapInterval ];
   275             [ gl_context getValues: &val forParameter: NSOpenGLCPSwapInterval ];
   276             *value = val;
   276             *value = val;
   277             return 0;
   277             return 0;
   278         }
   278         }
   279     }
   279     }