From 53f86ca606e57d231b8d3ee67957b59265bf6694 Mon Sep 17 00:00:00 2001 From: Cooper Yuan Date: Thu, 11 Aug 2011 17:44:01 +0800 Subject: fix error when use FULL_GL --- src/egl/opengles2/es2tri.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/egl/opengles2/es2tri.c b/src/egl/opengles2/es2tri.c index b0e14e81..6dcc1b86 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) { -- cgit v1.2.3