Demos (master): fix error when use FULL_GL

Cooper Yuan cooperyuan at kemper.freedesktop.org
Thu Aug 11 02:44:44 PDT 2011


Module: Demos
Branch: master
Commit: 53f86ca606e57d231b8d3ee67957b59265bf6694
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=53f86ca606e57d231b8d3ee67957b59265bf6694

Author: Cooper Yuan <cooperyuan at gmail.com>
Date:   Thu Aug 11 17:44:01 2011 +0800

fix error when use FULL_GL

---

 src/egl/opengles2/es2tri.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/egl/opengles2/es2tri.c b/src/egl/opengles2/es2tri.c
index b0e14e8..6dcc1b8 100644
--- a/src/egl/opengles2/es2tri.c
+++ b/src/egl/opengles2/es2tri.c
@@ -245,10 +245,17 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
       EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
       EGL_NONE
    };
+#if USE_FULL_GL
+   static const EGLint ctx_attribs[] = {
+       EGL_NONE
+   };
+#else
    static const EGLint ctx_attribs[] = {
       EGL_CONTEXT_CLIENT_VERSION, 2,
       EGL_NONE
    };
+#endif
+
    int scrnum;
    XSetWindowAttributes attr;
    unsigned long mask;
@@ -321,12 +328,14 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
       exit(1);
    }
 
+#if !USE_FULL_GL
    /* test eglQueryContext() */
    {
       EGLint val;
       eglQueryContext(egl_dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &val);
       assert(val == 2);
    }
+#endif
 
    *surfRet = eglCreateWindowSurface(egl_dpy, config, win, NULL);
    if (!*surfRet) {



More information about the mesa-commit mailing list