[Xquartz-changes] [204] AppleSGLX/trunk/glxext.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 20 03:10:49 PST 2009
Revision: 204
http://trac.macosforge.org/projects/xquartz/changeset/204
Author: gstaplin at apple.com
Date: 2009-02-20 03:10:49 -0800 (Fri, 20 Feb 2009)
Log Message:
-----------
Make the client side libGL set the GLX_PIXMAP_BIT and GLX_PBUFFER_BIT
for all GLXFBConfigs. (The GLX_WINDOW_BIT was previously always set,
and remains so still.)
Modified Paths:
--------------
AppleSGLX/trunk/glxext.c
Modified: AppleSGLX/trunk/glxext.c
===================================================================
--- AppleSGLX/trunk/glxext.c 2009-02-20 11:07:33 UTC (rev 203)
+++ AppleSGLX/trunk/glxext.c 2009-02-20 11:10:49 UTC (rev 204)
@@ -280,6 +280,9 @@
config->numAuxBuffers = *bp++;
config->level = *bp++;
+ /* AppleSGLX supports pixmap and pbuffers with all config. */
+ config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
+
count -= __GLX_MIN_CONFIG_PROPS;
}
@@ -371,6 +374,10 @@
break;
case GLX_DRAWABLE_TYPE:
config->drawableType = *bp++;
+
+ /* AppleSGLX supports pixmap and pbuffers with all config. */
+ config->drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT
+ | GLX_PBUFFER_BIT;
break;
case GLX_RENDER_TYPE:
config->renderType = *bp++;
@@ -481,8 +488,16 @@
m = modes;
for (i = 0; i < nvisuals; i++) {
_XRead(dpy, (char *)props, prop_size);
- /* Older X servers don't send this so we default it here. */
- m->drawableType = GLX_WINDOW_BIT;
+
+ /*
+ * The XQuartz 2.3.2.1 X server doesn't set this properly, so
+ * set the proper bits here.
+ * AppleSGLX supports windows, pixmaps, and pbuffers with all config.
+ * The xorg-server-1.6-apple branch supports pixmaps, but we those
+ * will fail at runtime with XQuartz 2.3.2.1.
+ */
+ m->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
+
__glXInitializeVisualConfigFromTags(m, nprops, props,
tagged_only, GL_TRUE);
m->screen = screen;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090220/5fa5ada4/attachment.html>
More information about the Xquartz-changes
mailing list