diff options
author | Cooper Yuan <cooperyuan@gmail.com> | 2011-08-11 17:44:01 +0800 |
---|---|---|
committer | Cooper Yuan <cooperyuan@gmail.com> | 2011-08-11 17:44:01 +0800 |
commit | 53f86ca606e57d231b8d3ee67957b59265bf6694 (patch) | |
tree | ff7a52a81e5e46715051cebf9d6acabb647681ed | |
parent | 82c3f7411bb67c94756d60a86cef8428614c3702 (diff) |
fix error when use FULL_GL
-rw-r--r-- | 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 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) { |