Module: Demos Branch: master Commit: c910a7876c1e8b71bf47eb02cd1faf31858f0b21 URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=c910a7876c1e8b71bf47eb02cd1faf31858f0b21
Author: Chia-I Wu <olva...@gmail.com> Date: Thu Nov 25 11:58:44 2010 +0800 hack for OpenVG RI --- src/egl/eglut/eglut.c | 2 +- src/egl/eglut/eglut_x11.c | 6 +++--- src/egl/openvg/trivial/eglcommon.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c index 2ee6f15..84dcb12 100644 --- a/src/egl/eglut/eglut.c +++ b/src/egl/eglut/eglut.c @@ -100,7 +100,7 @@ _eglutChooseConfig(void) config_attribs[i++] = EGL_BLUE_SIZE; config_attribs[i++] = 1; config_attribs[i++] = EGL_DEPTH_SIZE; - config_attribs[i++] = 1; + config_attribs[i++] = 0; config_attribs[i++] = EGL_SURFACE_TYPE; config_attribs[i++] = _eglut->surface_type; diff --git a/src/egl/eglut/eglut_x11.c b/src/egl/eglut/eglut_x11.c index e2f58ba..78a7b86 100644 --- a/src/egl/eglut/eglut_x11.c +++ b/src/egl/eglut/eglut_x11.c @@ -57,13 +57,13 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title, EGLint vid; if (!eglGetConfigAttrib(_eglut->dpy, - win->config, EGL_NATIVE_VISUAL_ID, &vid)) + win->config, EGL_BUFFER_SIZE, &vid)) _eglutFatal("failed to get visual id"); /* The X window visual must match the EGL config */ - visTemplate.visualid = vid; + visTemplate.depth = vid; visInfo = XGetVisualInfo(_eglut->native_dpy, - VisualIDMask, &visTemplate, &num_visuals); + VisualDepthMask, &visTemplate, &num_visuals); if (!visInfo) _eglutFatal("failed to get an visual of id 0x%x", vid); diff --git a/src/egl/openvg/trivial/eglcommon.c b/src/egl/openvg/trivial/eglcommon.c index 0316e59..3deee98 100644 --- a/src/egl/openvg/trivial/eglcommon.c +++ b/src/egl/openvg/trivial/eglcommon.c @@ -69,14 +69,14 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy, assert(config); - if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { + if (!eglGetConfigAttrib(egl_dpy, config, EGL_BUFFER_SIZE, &vid)) { printf("Error: eglGetConfigAttrib() failed\n"); exit(1); } /* The X window visual must match the EGL config */ - visTemplate.visualid = vid; - visInfo = XGetVisualInfo(x_dpy, VisualIDMask, &visTemplate, &num_visuals); + visTemplate.depth = vid; + visInfo = XGetVisualInfo(x_dpy, VisualDepthMask, &visTemplate, &num_visuals); if (!visInfo) { printf("Error: couldn't get X visual\n"); exit(1); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit