[Xquartz-changes] [283] AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 3 17:12:45 PST 2009


Revision: 283
          http://trac.macosforge.org/projects/xquartz/changeset/283
Author:   gstaplin at apple.com
Date:     2009-03-03 17:12:45 -0800 (Tue, 03 Mar 2009)
Log Message:
-----------
Test for glXMakeCurrent failure in the surface test.

Modified Paths:
--------------
    AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c

Modified: AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c
===================================================================
--- AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c	2009-03-04 01:00:09 UTC (rev 282)
+++ AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c	2009-03-04 01:12:45 UTC (rev 283)
@@ -48,9 +48,10 @@
 
 	draw(dpy, mainwin);
 	/* This should destroy the surface. */
-	glXMakeCurrent(dpy, None, ctx);
-	
-	XSync(dpy, False);
+	if(!glXMakeCurrent(dpy, None, ctx)) {
+	    fprintf(stderr, "%s: make current None failed!\n");
+	    exit(EXIT_FAILURE);
+	}	
 
 	printf("destroying mainwin 0x%lx\n", mainwin);
 	XDestroyWindow(dpy, mainwin);
@@ -66,7 +67,10 @@
 	printf("created mainwin 0x%lx\n", mainwin);
 
 	/* This should recreate the surface. */
-	glXMakeCurrent(dpy, mainwin, ctx);
+	if(!glXMakeCurrent(dpy, mainwin, ctx)) {
+	    fprintf(stderr, "%s: make mainwin current failed!\n");
+	    exit(EXIT_FAILURE);
+	}
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090303/cdffb682/attachment.html>


More information about the Xquartz-changes mailing list