From b2f09710684983a5381ce8d199fef6a49645e825 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 22 Jan 2010 05:55:46 +0000 Subject: [PATCH] fix variable SVN revision: 45427 --- .../src/modules/engines/gl_x11/evas_engine.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c index 9e60304a04..0506f7a729 100644 --- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c @@ -110,13 +110,14 @@ eng_setup(Evas *e, void *in) { Render_Engine *re; Evas_Engine_Info_GL_X11 *info; - int eb, evb; info = (Evas_Engine_Info_GL_X11 *)in; if (!e->engine.data.output) { #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) #else + int eb, evb; + if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0; #endif re = calloc(1, sizeof(Render_Engine)); @@ -1015,7 +1016,6 @@ struct _Native #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) EGLSurface egl_surface; - EGLContext egl_context; #else # ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT GLXFBConfig fbc; @@ -1091,11 +1091,6 @@ _native_free_cb(void *data, void *image) Native *n = im->native.data; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) - if (n->egl_context) - { - eglDestroyContext(re->win->egl_disp, n->egl_context); - n->egl_context = 0; - } if (n->egl_surface) { eglDestroySurface(re->win->egl_disp, n->egl_surface); @@ -1159,14 +1154,9 @@ eng_image_native_set(void *data, void *image, void *native) if (n) { EGLConfig egl_config; - int context_attrs[3]; int config_attrs[20]; int num_config, i; - context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; - context_attrs[1] = 2; - context_attrs[2] = EGL_NONE; - i = 0; config_attrs[i++] = EGL_RED_SIZE; config_attrs[i++] = 8; @@ -1187,11 +1177,8 @@ eng_image_native_set(void *data, void *image, void *native) eglChooseConfig(re->win->egl_disp, config_attrs, &egl_config, 1, &num_config); n->egl_surface = eglCreatePixmapSurface(re->win->egl_disp, - egl_config, pixmap, + egl_config, pm, NULL); - eglBindAPI(EGL_OPENGL_ES_API); - n->egl_context = eglCreateContext(re->win->egl_disp, egl_config, - NULL, context_attrs); evas_gl_common_image_native_enable(im); n->pixmap = pm; n->visual = vis;