[283] AppleSGLX/trunk/tests/triangle_glx/triangle_glx_surface-2.c
Revision: 283 http://trac.macosforge.org/projects/xquartz/changeset/283 Author: gstaplin@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); + } } }
participants (1)
-
source_changes@macosforge.org