Revision
242
Author
gstaplin@apple.com
Date
2009-02-22 16:14:29 -0800 (Sun, 22 Feb 2009)

Log Message

Fix some bugs in apple_xgl_api_read.c that one Mesa
demo brought out.

The struct apple_glx_context * wasn't being passed, instead
the GLXContext was being passed as the void *.

Modified Paths

Diff

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


--- AppleSGLX/trunk/apple_xgl_api_read.c	2009-02-23 00:06:03 UTC (rev 241)
+++ AppleSGLX/trunk/apple_xgl_api_read.c	2009-02-23 00:14:29 UTC (rev 242)
@@ -65,9 +65,11 @@
 
 	saved->swapped = true;
 
-	if(apple_glx_make_current_context(dpy, gc, gc, gc->currentReadable)) {
+	if(apple_glx_make_current_context(dpy, gc->apple, gc->apple, 
+					  gc->currentReadable)) {
 	    /* An error occurred, so try to restore the old context state. */
-	    (void)apple_glx_make_current_context(dpy, gc, gc, gc->currentDrawable);
+	    (void)apple_glx_make_current_context(dpy, gc->apple, gc->apple, 
+						 gc->currentDrawable);
 	    saved->swapped = false;
 	}
     }
@@ -78,7 +80,8 @@
 	GLXContext gc = __glXGetCurrentContext();
 	Display *dpy = glXGetCurrentDisplay();
 
-	if(apple_glx_make_current_context(dpy, gc, gc, gc->currentDrawable)) {
+	if(apple_glx_make_current_context(dpy, gc->apple, gc->apple,
+					  gc->currentDrawable)) {
 	    /*
 	     * An error occurred restoring the drawable.
 	     * It's unclear what to do about that.