[Xquartz-changes] [264] AppleSGLX/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 26 07:45:09 PST 2009
Revision: 264
http://trac.macosforge.org/projects/xquartz/changeset/264
Author: gstaplin at apple.com
Date: 2009-02-26 07:45:08 -0800 (Thu, 26 Feb 2009)
Log Message:
-----------
Improve the multisample_glx test.
It seems that glXCreateContext doesn't support the GLX_SAMPLE_BUFFERS and friends,
perhaps because the visuals strip out that code. However, we can use
glXCreateNewContext (part of GLX 1.3) to create a GLXContext that does enable
the sampling.
What's odd is that the test worked before with xserver 1.6, and 1.4
reported 0 samples, and sample buffers.
Also reindent a bit of code in glxext.c.
Modified Paths:
--------------
AppleSGLX/trunk/glxext.c
AppleSGLX/trunk/tests/simple/multisample_glx.c
Modified: AppleSGLX/trunk/glxext.c
===================================================================
--- AppleSGLX/trunk/glxext.c 2009-02-26 15:04:50 UTC (rev 263)
+++ AppleSGLX/trunk/glxext.c 2009-02-26 15:45:08 UTC (rev 264)
@@ -420,7 +420,7 @@
config->sampleBuffers = *bp++;
break;
case GLX_SAMPLES_SGIS:
- config->samples = *bp++;
+ config->samples = *bp++;
break;
case GLX_BIND_TO_TEXTURE_RGB_EXT:
config->bindToTextureRgb = *bp++;
Modified: AppleSGLX/trunk/tests/simple/multisample_glx.c
===================================================================
--- AppleSGLX/trunk/tests/simple/multisample_glx.c 2009-02-26 15:04:50 UTC (rev 263)
+++ AppleSGLX/trunk/tests/simple/multisample_glx.c 2009-02-26 15:45:08 UTC (rev 264)
@@ -89,6 +89,8 @@
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8,
+ GLX_SAMPLE_BUFFERS, 1,
+ GLX_SAMPLES, 1,
None
};
@@ -157,10 +159,11 @@
CWBackPixel | CWBorderPixel | CWColormap | CWEventMask,
&attr);
- ctx = glXCreateContext(dpy, visinfo, NULL, True );
+ ctx = glXCreateNewContext(dpy, fbconfig[bestfbi], GLX_WINDOW_BIT,
+ NULL, True);
if (!ctx) {
- fprintf(stderr, "error: glXCreateContext failed!\n");
+ fprintf(stderr, "error: glXCreateNewContext failed!\n");
return EXIT_FAILURE;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090226/1908fbca/attachment.html>
More information about the Xquartz-changes
mailing list