setBlendFunc doesn't work

setBlendFunc doesn't work
0.0 0


I am trying Simulating mud/slime with cocos2d-html5,use the method of Hao Wu said that( but when I use setBlendFunc to add the sprite to cc.RenderTexture. The setBlendFunc doesn’t work.

My code:

var texture = cc.RenderTexture.create(126, 67);
var temp_sprite = cc.Sprite.create(s_circle,cc.rect(0, 0, 126, 67));
temp_sprite.setAnchorPoint(cc.p(0, 0));
temp_sprite.setPosition(0, 0);
temp_sprite.setBlendFunc(new cc.BlendFunc(cc.GL_ONE, cc.GL_ZERO));
texture.setPosition(cc.p(100, 100));


Did you set the renderMode to WebGL mode?

Please modify renderMode to 2 in cocos2d.js

renderMode:0, //Choose of RenderMode: 0(default), 1(Canvas only), 2(WebGL only)


Hi,Dingping Lv, Thank you. _. I reply it late. Sorry


I used cocos js 3.10 when i test on android it don’t work on webGl mode
and when i choose renderMode 0 it will broke down when i use setBlendFunc