fix gl engine make current impl (for ne evas gl stuff so no chlog
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 May 2011 07:10:37 +0000 (07:10 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 May 2011 07:10:37 +0000 (07:10 +0000)
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

index 83612a7..15c00e3 100644 (file)
@@ -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)) 
           {