hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=461555e4cc44adcdf13ccb64d066180824fc75c9

commit 461555e4cc44adcdf13ccb64d066180824fc75c9
Author: ChunEon Park <[email protected]>
Date:   Sat Mar 22 21:09:58 2014 +0900

    evas/gl - fill up missed blend mode.
    
    Still there few mode are unsatisfied.
    
    @fix
---
 .../evas/engines/gl_common/evas_gl_context.c       | 26 ++++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 182207b..a699932 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -2767,30 +2767,42 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
                {
                case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */
                   glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-                  GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+                  break;
+               case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
+                  glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
                   break;
                case EVAS_RENDER_COPY: /**< d = s */
                   gc->pipe[i].shader.blend = 0;
                   // just disable blend mode. no need to set blend func
-                  //glBlendFunc(GL_ONE, GL_ONE);
-                  //GLERR(__FUNCTION__, __FILE__, __LINE__, "");
+                  //glBlendFunc(GL_ONE, GL_ZERO);
                   break;
-                  // FIXME: fix blend funcs below!
-               case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
                case EVAS_RENDER_COPY_REL: /**< d = s*da */
+                  glBlendFunc(GL_DST_ALPHA, GL_ZERO);
+                  break;
                case EVAS_RENDER_ADD: /**< d = d + s */
+                  glBlendFunc(GL_ONE, GL_ONE);
+                  break;
                case EVAS_RENDER_ADD_REL: /**< d = d + s*da */
+                  glBlendFunc(GL_DST_ALPHA, GL_ONE);
+                  break;
                case EVAS_RENDER_SUB: /**< d = d - s */
+                  glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
+                  break;
                case EVAS_RENDER_SUB_REL: /**< d = d - s*da */
+                  glBlendFunc(GL_ZERO, GL_ONE_MINUS_DST_ALPHA);
+                  break;
+               case EVAS_RENDER_MASK: /**< d = d*sa */
+                  glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
+                  break;
+               // FIXME: fix blend funcs below!
                case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */
                case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */
-               case EVAS_RENDER_MASK: /**< d = d*sa */
                case EVAS_RENDER_MUL: /**< d = d*s */
                default:
                   glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-                  GLERR(__FUNCTION__, __FILE__, __LINE__, "");
                   break;
                }
+             GLERR(__FUNCTION__, __FILE__, __LINE__, "");
           }
         if (gc->pipe[i].shader.blend != gc->state.current.blend)
           {

-- 


Reply via email to