From e40f77293e712e9f56fe8bcb40444295d3930ecf Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 31 May 2011 07:10:37 +0000 Subject: [PATCH] fix gl engine make current impl (for ne evas gl stuff so no chlog needed) to handle make current return value right git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59834 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_x11/evas_engine.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/modules/engines/gl_x11/evas_engine.c b/src/modules/engines/gl_x11/evas_engine.c index 83612a7..15c00e3 100644 --- a/src/modules/engines/gl_x11/evas_engine.c +++ b/src/modules/engines/gl_x11/evas_engine.c @@ -2560,22 +2560,18 @@ eng_gl_make_current(void *data, void *surface, void *context) ERR("xxxMakeCurrent() failed!"); return 0; } - return ret; } // Don't do a make current if it's already current + ret = 1; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) if ((eglGetCurrentContext() != ctx->context)) - { - ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], - re->win->egl_surface[0], ctx->context); - } + ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], + re->win->egl_surface[0], ctx->context); #else if (glXGetCurrentContext() != ctx->context) - { - ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context); - } + ret = glXMakeCurrent(re->info->info.display, re->win->win, ctx->context); #endif if (!ret) { @@ -2591,7 +2587,7 @@ eng_gl_make_current(void *data, void *surface, void *context) } // Attach FBO if it hasn't been attached or if surface changed - if ( (!sfc->fbo_attached) || (ctx != sfc->current_ctx)) + if ((!sfc->fbo_attached) || (ctx != sfc->current_ctx)) { if (!_attach_fbo_surface(re, sfc, ctx)) { -- 2.7.4