Modified: AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c (282 => 283)
--- 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);
+ }
}
}