Revision
241
Author
gstaplin@apple.com
Date
2009-02-22 16:06:03 -0800 (Sun, 22 Feb 2009)

Log Message

Correct the currentReadable usage with the apple_xgl_api_read.c
code.  The glCopyPixels may not be right in the case of a
readable drawable specified to glXMakeContextCurrent.  
I think it needs more testing.

Modified Paths

Diff

Modified: AppleSGLX/trunk/apple_xgl_api_read.c (240 => 241)


--- AppleSGLX/trunk/apple_xgl_api_read.c	2009-02-22 23:39:12 UTC (rev 240)
+++ AppleSGLX/trunk/apple_xgl_api_read.c	2009-02-23 00:06:03 UTC (rev 241)
@@ -59,7 +59,8 @@
      * the user has requested a readable drawable with glXMakeContextCurrent().
      * We emulate this behavior by switching the current drawable.
      */
-    if(gc->currentReadable != gc->currentDrawable) {
+    if(None != gc->currentReadable 
+       && gc->currentReadable != gc->currentDrawable) {
 	Display *dpy = glXGetCurrentDisplay();
 
 	saved->swapped = true;