Revision
299
Author
gstaplin@apple.com
Date
2009-03-09 19:12:05 -0700 (Mon, 09 Mar 2009)

Log Message

Add kCGLPFAClosestPolicy to the pixel format object creation attributes.

This should provide more accurate matches of pixel format objects to 
GLXFBConfig and Visuals.

Modified Paths

Diff

Modified: AppleSGLX/trunk/apple_visual.c (298 => 299)


--- AppleSGLX/trunk/apple_visual.c	2009-03-09 05:34:18 UTC (rev 298)
+++ AppleSGLX/trunk/apple_visual.c	2009-03-10 02:12:05 UTC (rev 299)
@@ -52,7 +52,14 @@
 	attr[numattr++] = kCGLPFAColorSize;
 	attr[numattr++] = 32;
     }
-    
+
+    /* 
+     * The program chose a config based on the fbconfigs or visuals.
+     * Those are based on the attributes from CGL, so we probably
+     * do want the closest match for the color, depth, and accum.
+     */
+    attr[numattr++] = kCGLPFAClosestPolicy;
+
     if(c->stereoMode) 
 	attr[numattr++] = kCGLPFAStereo;