changeset 668:f91ded895274

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Fri, 08 Aug 2003 15:01:14 +0000
parents adbed8d7a991
children 37bb90b3d976
files src/video/quartz/SDL_QuartzVideo.m
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzVideo.m	Wed Aug 06 21:54:32 2003 +0000
+++ b/src/video/quartz/SDL_QuartzVideo.m	Fri Aug 08 15:01:14 2003 +0000
@@ -1468,6 +1468,31 @@
         return 0;
     }
 
+    /*
+     * Wisdom from Apple engineer in reference to UT2003's OpenGL performance:
+     *  "You are blowing a couple of the internal OpenGL function caches. This
+     *  appears to be happening in the VAO case.  You can tell OpenGL to up
+     *  the cache size by issuing the following calls right after you create
+     *  the OpenGL context.  The default cache size is 16."    --ryan.
+     */
+
+    #ifndef GLI_ARRAY_FUNC_CACHE_MAX
+    #define GLI_ARRAY_FUNC_CACHE_MAX 284
+    #endif
+
+    #ifndef GLI_SUBMIT_FUNC_CACHE_MAX
+    #define GLI_SUBMIT_FUNC_CACHE_MAX 280
+    #endif
+
+    {
+        long cache_max = 64;
+        CGLContextObj ctx = [ gl_context cglContext ];
+        CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
+        CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
+    }
+
+    /* End Wisdom from Apple Engineer section. --ryan. */
+
     /* Convince SDL that the GL "driver" is loaded */
     this->gl_config.driver_loaded = 1;