comparison src/video/quartz/SDL_QuartzVideo.m @ 668:f91ded895274

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Fri, 08 Aug 2003 15:01:14 +0000
parents 714053f573e7
children be597a247e20
comparison
equal deleted inserted replaced
667:adbed8d7a991 668:f91ded895274
1466 if (gl_context == nil) { 1466 if (gl_context == nil) {
1467 SDL_SetError ("Failed creating OpenGL context"); 1467 SDL_SetError ("Failed creating OpenGL context");
1468 return 0; 1468 return 0;
1469 } 1469 }
1470 1470
1471 /*
1472 * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
1473 * "You are blowing a couple of the internal OpenGL function caches. This
1474 * appears to be happening in the VAO case. You can tell OpenGL to up
1475 * the cache size by issuing the following calls right after you create
1476 * the OpenGL context. The default cache size is 16." --ryan.
1477 */
1478
1479 #ifndef GLI_ARRAY_FUNC_CACHE_MAX
1480 #define GLI_ARRAY_FUNC_CACHE_MAX 284
1481 #endif
1482
1483 #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
1484 #define GLI_SUBMIT_FUNC_CACHE_MAX 280
1485 #endif
1486
1487 {
1488 long cache_max = 64;
1489 CGLContextObj ctx = [ gl_context cglContext ];
1490 CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
1491 CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
1492 }
1493
1494 /* End Wisdom from Apple Engineer section. --ryan. */
1495
1471 /* Convince SDL that the GL "driver" is loaded */ 1496 /* Convince SDL that the GL "driver" is loaded */
1472 this->gl_config.driver_loaded = 1; 1497 this->gl_config.driver_loaded = 1;
1473 1498
1474 [ fmt release ]; 1499 [ fmt release ];
1475 1500