summaryrefslogtreecommitdiff
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:13:08 +0900
commit0645512feabd60d6e775f3b362775278aefbc460 (patch)
tree6c1c662601e4d32f8166ec31d2957c20ff8fde49
parent6a2eff512fe1fcf9748b2e48586a4e6fa71ba961 (diff)
evas/gl - fill up missed blend mode.
Still there few mode are unsatisfied. @fix Conflicts: src/modules/evas/engines/gl_common/evas_gl_context.c
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c27
1 files changed, 20 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 2e447d9..0ea2d47 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -2766,29 +2766,42 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2766 { 2766 {
2767 case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */ 2767 case EVAS_RENDER_BLEND: /**< default op: d = d*(1-sa) + s */
2768 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 2768 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2769 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 2769 break;
2770 case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
2771 glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2770 break; 2772 break;
2771 case EVAS_RENDER_COPY: /**< d = s */ 2773 case EVAS_RENDER_COPY: /**< d = s */
2772 gc->pipe[i].shader.blend = 0; 2774 gc->pipe[i].shader.blend = 0;
2773 glBlendFunc(GL_ONE, GL_ONE); 2775 // just disable blend mode. no need to set blend func
2774 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 2776 //glBlendFunc(GL_ONE, GL_ZERO);
2775 break; 2777 break;
2776 // FIXME: fix blend funcs below!
2777 case EVAS_RENDER_BLEND_REL: /**< d = d*(1 - sa) + s*da */
2778 case EVAS_RENDER_COPY_REL: /**< d = s*da */ 2778 case EVAS_RENDER_COPY_REL: /**< d = s*da */
2779 glBlendFunc(GL_DST_ALPHA, GL_ZERO);
2780 break;
2779 case EVAS_RENDER_ADD: /**< d = d + s */ 2781 case EVAS_RENDER_ADD: /**< d = d + s */
2782 glBlendFunc(GL_ONE, GL_ONE);
2783 break;
2780 case EVAS_RENDER_ADD_REL: /**< d = d + s*da */ 2784 case EVAS_RENDER_ADD_REL: /**< d = d + s*da */
2785 glBlendFunc(GL_DST_ALPHA, GL_ONE);
2786 break;
2781 case EVAS_RENDER_SUB: /**< d = d - s */ 2787 case EVAS_RENDER_SUB: /**< d = d - s */
2788 glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
2789 break;
2782 case EVAS_RENDER_SUB_REL: /**< d = d - s*da */ 2790 case EVAS_RENDER_SUB_REL: /**< d = d - s*da */
2791 glBlendFunc(GL_ZERO, GL_ONE_MINUS_DST_ALPHA);
2792 break;
2793 case EVAS_RENDER_MASK: /**< d = d*sa */
2794 glBlendFunc(GL_ZERO, GL_SRC_ALPHA);
2795 break;
2796 // FIXME: fix blend funcs below!
2783 case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */ 2797 case EVAS_RENDER_TINT: /**< d = d*s + d*(1 - sa) + s*(1 - da) */
2784 case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */ 2798 case EVAS_RENDER_TINT_REL: /**< d = d*(1 - sa + s) */
2785 case EVAS_RENDER_MASK: /**< d = d*sa */
2786 case EVAS_RENDER_MUL: /**< d = d*s */ 2799 case EVAS_RENDER_MUL: /**< d = d*s */
2787 default: 2800 default:
2788 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 2801 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
2789 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2790 break; 2802 break;
2791 } 2803 }
2804 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
2792 } 2805 }
2793 if (gc->pipe[i].shader.blend != gc->state.current.blend) 2806 if (gc->pipe[i].shader.blend != gc->state.current.blend)
2794 { 2807 {