summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-03-22 21:09:58 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-03-22 21:09:58 +0900
commit461555e4cc44adcdf13ccb64d066180824fc75c9 (patch)
treeb23ab97d8b6ed7e2e4b15b9e5b89934dbf8c7a8d /src
parentf556cd1328c502d1778e883b095a5a184892e538 (diff)
evas/gl - fill up missed blend mode.
Still there few mode are unsatisfied. @fix
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c26
1 files 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)
2767 { 2767 {
2768 case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */ 2768 case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */
2769 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 2769 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2770 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 2770 break;
2771 case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
2772 glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2771 break; 2773 break;
2772 case EVAS_RENDER_COPY: /**< d = s */ 2774 case EVAS_RENDER_COPY: /**< d = s */
2773 gc->pipe[i].shader.blend = 0; 2775 gc->pipe[i].shader.blend = 0;
2774 // just disable blend mode. no need to set blend func 2776 // just disable blend mode. no need to set blend func
2775 //glBlendFunc(GL_ONE, GL_ONE); 2777 //glBlendFunc(GL_ONE, GL_ZERO);
2776 //GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2777 break; 2778 break;
2778 // FIXME: fix blend funcs below!
2779 case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
2780 case EVAS_RENDER_COPY_REL: /**< d = s*da */ 2779 case EVAS_RENDER_COPY_REL: /**< d = s*da */
2780 glBlendFunc(GL_DST_ALPHA, GL_ZERO);
2781 break;
2781 case EVAS_RENDER_ADD: /**< d = d + s */ 2782 case EVAS_RENDER_ADD: /**< d = d + s */
2783 glBlendFunc(GL_ONE, GL_ONE);
2784 break;
2782 case EVAS_RENDER_ADD_REL: /**< d = d + s*da */ 2785 case EVAS_RENDER_ADD_REL: /**< d = d + s*da */
2786 glBlendFunc(GL_DST_ALPHA, GL_ONE);
2787 break;
2783 case EVAS_RENDER_SUB: /**< d = d - s */ 2788 case EVAS_RENDER_SUB: /**< d = d - s */
2789 glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
2790 break;
2784 case EVAS_RENDER_SUB_REL: /**< d = d - s*da */ 2791 case EVAS_RENDER_SUB_REL: /**< d = d - s*da */
2792 glBlendFunc(GL_ZERO, GL_ONE_MINUS_DST_ALPHA);
2793 break;
2794 case EVAS_RENDER_MASK: /**< d = d*sa */
2795 glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
2796 break;
2797 // FIXME: fix blend funcs below!
2785 case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */ 2798 case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */
2786 case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */ 2799 case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */
2787 case EVAS_RENDER_MASK: /**< d = d*sa */
2788 case EVAS_RENDER_MUL: /**< d = d*s */ 2800 case EVAS_RENDER_MUL: /**< d = d*s */
2789 default: 2801 default:
2790 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 2802 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2791 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2792 break; 2803 break;
2793 } 2804 }
2805 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2794 } 2806 }
2795 if (gc->pipe[i].shader.blend != gc->state.current.blend) 2807 if (gc->pipe[i].shader.blend != gc->state.current.blend)
2796 { 2808 {