summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-02-17 00:17:31 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-02-17 00:17:31 +0000
commit8f9a594ac8116ed5cab7f8eca14c17ec3e250dad (patch)
treee9fb70f4c2d91fd45d6712e388972a3f4436810f /src/mesa/drivers/x11
parentf7e1dfeaefda8865252513bc4d880ea8640efe4d (diff)
added MESA_GLX_FORCE_CI env var (useful for conformance testing)
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index cd49940305..4e5d5acd49 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.45 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.46 2001/02/17 00:17:31 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -337,22 +337,40 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
);
}
else if (is_usable_visual( visinfo )) {
- /* Configure this visual as RGB, double-buffered, depth-buffered. */
- /* This is surely wrong for some people's needs but what else */
- /* can be done? They should use glXChooseVisual(). */
- return save_glx_visual( dpy, visinfo,
- GL_TRUE, /* rgb */
- GL_FALSE, /* alpha */
- GL_TRUE, /* double */
- GL_FALSE, /* stereo */
- DEFAULT_SOFTWARE_DEPTH_BITS,
- 8 * sizeof(GLstencil),
- 8 * sizeof(GLaccum), /* r */
- 8 * sizeof(GLaccum), /* g */
- 8 * sizeof(GLaccum), /* b */
- 8 * sizeof(GLaccum), /* a */
- 0 /* level */
- );
+ if (getenv("MESA_GLX_FORCE_CI")) {
+ /* Configure this visual as a COLOR INDEX visual. */
+ return save_glx_visual( dpy, visinfo,
+ GL_FALSE, /* rgb */
+ GL_FALSE, /* alpha */
+ GL_TRUE, /* double */
+ GL_FALSE, /* stereo */
+ DEFAULT_SOFTWARE_DEPTH_BITS,
+ 8 * sizeof(GLstencil),
+ 0 * sizeof(GLaccum), /* r */
+ 0 * sizeof(GLaccum), /* g */
+ 0 * sizeof(GLaccum), /* b */
+ 0 * sizeof(GLaccum), /* a */
+ 0 /* level */
+ );
+ }
+ else {
+ /* Configure this visual as RGB, double-buffered, depth-buffered. */
+ /* This is surely wrong for some people's needs but what else */
+ /* can be done? They should use glXChooseVisual(). */
+ return save_glx_visual( dpy, visinfo,
+ GL_TRUE, /* rgb */
+ GL_FALSE, /* alpha */
+ GL_TRUE, /* double */
+ GL_FALSE, /* stereo */
+ DEFAULT_SOFTWARE_DEPTH_BITS,
+ 8 * sizeof(GLstencil),
+ 8 * sizeof(GLaccum), /* r */
+ 8 * sizeof(GLaccum), /* g */
+ 8 * sizeof(GLaccum), /* b */
+ 8 * sizeof(GLaccum), /* a */
+ 0 /* level */
+ );
+ }
}
else {
fprintf(stderr,"Mesa: error in glXCreateContext: bad visual\n");