*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Fri, 08 Aug 2003 15:01:14 +0000
changeset 668f91ded895274
parent 667 adbed8d7a991
child 669 37bb90b3d976
*** empty log message ***
src/video/quartz/SDL_QuartzVideo.m
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Wed Aug 06 21:54:32 2003 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Fri Aug 08 15:01:14 2003 +0000
     1.3 @@ -1468,6 +1468,31 @@
     1.4          return 0;
     1.5      }
     1.6  
     1.7 +    /*
     1.8 +     * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
     1.9 +     *  "You are blowing a couple of the internal OpenGL function caches. This
    1.10 +     *  appears to be happening in the VAO case.  You can tell OpenGL to up
    1.11 +     *  the cache size by issuing the following calls right after you create
    1.12 +     *  the OpenGL context.  The default cache size is 16."    --ryan.
    1.13 +     */
    1.14 +
    1.15 +    #ifndef GLI_ARRAY_FUNC_CACHE_MAX
    1.16 +    #define GLI_ARRAY_FUNC_CACHE_MAX 284
    1.17 +    #endif
    1.18 +
    1.19 +    #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
    1.20 +    #define GLI_SUBMIT_FUNC_CACHE_MAX 280
    1.21 +    #endif
    1.22 +
    1.23 +    {
    1.24 +        long cache_max = 64;
    1.25 +        CGLContextObj ctx = [ gl_context cglContext ];
    1.26 +        CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
    1.27 +        CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
    1.28 +    }
    1.29 +
    1.30 +    /* End Wisdom from Apple Engineer section. --ryan. */
    1.31 +
    1.32      /* Convince SDL that the GL "driver" is loaded */
    1.33      this->gl_config.driver_loaded = 1;
    1.34