summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/x11/x11_screen.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-09 18:05:16 +0800
committerChia-I Wu <olv@lunarg.com>2010-04-11 01:17:47 +0800
commitf7730c0740cc8a43c3573dcdbf43e76630d957f6 (patch)
tree203329248def9a82d044c3f81375c0956920b64e /src/gallium/state_trackers/egl/x11/x11_screen.c
parent51430c21ffd212d801f129d625f3ae8713372f68 (diff)
st/egl: Remove __GLcontextModes from the native interface.
Replace __GLcontextModes by a subset of its attributes that makes sense to EGL. This also gets rid of GL headers from the common code.
Diffstat (limited to 'src/gallium/state_trackers/egl/x11/x11_screen.c')
-rw-r--r--src/gallium/state_trackers/egl/x11/x11_screen.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.c b/src/gallium/state_trackers/egl/x11/x11_screen.c
index b5dfe24342..dd820a369e 100644
--- a/src/gallium/state_trackers/egl/x11/x11_screen.c
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.c
@@ -177,63 +177,6 @@ x11_screen_get_visuals(struct x11_screen *xscr, int *num_visuals)
return xscr->visuals;
}
-void
-x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
- __GLcontextModes *mode)
-{
- int r, g, b, a;
- int visual_type;
-
- r = util_bitcount(visual->red_mask);
- g = util_bitcount(visual->green_mask);
- b = util_bitcount(visual->blue_mask);
- a = visual->depth - (r + g + b);
-#if defined(__cplusplus) || defined(c_plusplus)
- visual_type = visual->c_class;
-#else
- visual_type = visual->class;
-#endif
-
- /* convert to GLX visual type */
- switch (visual_type) {
- case TrueColor:
- visual_type = GLX_TRUE_COLOR;
- break;
- case DirectColor:
- visual_type = GLX_DIRECT_COLOR;
- break;
- case PseudoColor:
- visual_type = GLX_PSEUDO_COLOR;
- break;
- case StaticColor:
- visual_type = GLX_STATIC_COLOR;
- break;
- case GrayScale:
- visual_type = GLX_GRAY_SCALE;
- break;
- case StaticGray:
- visual_type = GLX_STATIC_GRAY;
- break;
- default:
- visual_type = GLX_NONE;
- break;
- }
-
- mode->rgbBits = r + g + b + a;
- mode->redBits = r;
- mode->greenBits = g;
- mode->blueBits = b;
- mode->alphaBits = a;
- mode->visualID = visual->visualid;
- mode->visualType = visual_type;
-
- /* sane defaults */
- mode->renderType = GLX_RGBA_BIT;
- mode->rgbMode = TRUE;
- mode->visualRating = GLX_SLOW_CONFIG;
- mode->xRenderable = TRUE;
-}
-
/**
* Return the GLX fbconfigs.
*/