Revision
156
Author
gstaplin@apple.com
Date
2009-02-16 15:57:14 -0800 (Mon, 16 Feb 2009)

Log Message

Use the new pitch from the apple pixmap API in the make current code.

Modified Paths

Diff

Modified: AppleSGLX/trunk/apple_glx_context.c (155 => 156)


--- AppleSGLX/trunk/apple_glx_context.c	2009-02-16 23:56:05 UTC (rev 155)
+++ AppleSGLX/trunk/apple_glx_context.c	2009-02-16 23:57:14 UTC (rev 156)
@@ -425,25 +425,20 @@
 	break;
 
     case APPLE_GLX_DRAWABLE_PIXMAP: {
-	int width, height;
+	int width, height, pitch, bpp;
 	void *ptr;
 
 	
 	apple_cgl.clear_drawable(ac->context_obj);
 
 	if(false == apple_glx_pixmap_data(dpy, ac->drawable->drawable,
-					  &width, &height,
+					  &width, &height, &pitch, &bpp,
 					  &ptr)) {
-
-	    
-	    fprintf(stderr, "invalid GLXPixmap: 0x%lx\n", ac->drawable->drawable);
 	    return true;
 	}
 	
-	printf("%s ptr %p\n", __func__, ptr);
-
 	cglerr = apple_cgl.set_off_screen(ac->context_obj, width, height,
-					  width * /*FIXME?*/ 4, ptr);
+					  pitch, ptr);
 
 	if(kCGLNoError != cglerr) {
 	    fprintf(stderr, "set off screen: %s\n",