I am trying Simulating mud/slime with cocos2d-html5,use the method of Hao Wu said that(http://www.cocos2d-x.org/forums/19/topics/41433). 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);
texture.begin();
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.visit();
temp_sprite.setBlendFunc(new cc.BlendFunc(cc.GL_ONE, cc.GL_ZERO));
//temp_sprite.setOpacityModifyRGB(true);
texture.end();
this.addChild(texture);
texture.setPosition(cc.p(100, 100));