summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-08-10 10:32:49 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-10 10:32:49 +0000
commitd101c4eddc8d0df92ddbfa309d4eeef3b154fb53 (patch)
treea8b11fa2dcadbe88b5c63d77f6dae7f523e90610 /legacy
parente2957462c8530f3140e6e2e8f314e5411fc35bd1 (diff)
theoretically this should fix alpha dest stuff in egl-x11... it
always worked oddly enough :) SVN revision: 75086
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_x_main.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c
index 53c65ed634..f6120cf062 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_x_main.c
@@ -4,6 +4,7 @@ static Evas_GL_X11_Window *_evas_gl_x11_window = NULL;
4 4
5#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 5#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
6static EGLContext context = EGL_NO_CONTEXT; 6static EGLContext context = EGL_NO_CONTEXT;
7static EGLContext rgba_context = EGL_NO_CONTEXT;
7#else 8#else
8// FIXME: this will only work for 1 display connection (glx land can have > 1) 9// FIXME: this will only work for 1 display connection (glx land can have > 1)
9static GLXContext context = 0; 10static GLXContext context = 0;
@@ -196,10 +197,20 @@ eng_window_new(Display *disp,
196 eng_window_free(gw); 197 eng_window_free(gw);
197 return NULL; 198 return NULL;
198 } 199 }
199 if (context == EGL_NO_CONTEXT) 200 if (gw->alpha)
200 context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, 201 {
201 context_attrs); 202 if (rgba_context == EGL_NO_CONTEXT)
202 gw->egl_context[0] = context; 203 rgba_context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL,
204 context_attrs);
205 gw->egl_context[0] = rgba_context;
206 }
207 else
208 {
209 if (context == EGL_NO_CONTEXT)
210 context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL,
211 context_attrs);
212 gw->egl_context[0] = context;
213 }
203 if (gw->egl_context[0] == EGL_NO_CONTEXT) 214 if (gw->egl_context[0] == EGL_NO_CONTEXT)
204 { 215 {
205 ERR("eglCreateContext() fail. code=%#x", eglGetError()); 216 ERR("eglCreateContext() fail. code=%#x", eglGetError());
@@ -552,8 +563,10 @@ eng_window_free(Evas_GL_X11_Window *gw)
552 if (ref == 0) 563 if (ref == 0)
553 { 564 {
554 if (context) eglDestroyContext(gw->egl_disp, context); 565 if (context) eglDestroyContext(gw->egl_disp, context);
566 if (rgba_context) eglDestroyContext(gw->egl_disp, rgba_context);
555 eglTerminate(gw->egl_disp); 567 eglTerminate(gw->egl_disp);
556 context = EGL_NO_CONTEXT; 568 context = EGL_NO_CONTEXT;
569 rgba_context = EGL_NO_CONTEXT;
557 } 570 }
558 eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); 571 eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
559#else 572#else