请教如何在h5中使用RenderTexture

var winSize = cc.director.getWinSize();

var tex = new cc.RenderTexture(winSize.width, winSize.height, cc.Texture2D.PIXEL_FORMAT_RGBA8888);
tex.retain();
tex.setPosition(cc.p(winSize.width / 2, winSize.height / 2));

   // tex.clear(0,0,0,0);
      tex.begin();
    var sp=new cc.Sprite("res/num.png");
    sp.retain();
    sp.setPosition(cc.p(winSize.width / 2, winSize.height / 2));
    sp.visit();
  //  cc.director.getRunningScene().visit();
    tex.end();

this.addChild(tex);

这个不知道哪里错了,没显示。
我想实现的功能是,从一张图中 截取 两个数字 合并 放到sprite中,有没有思路啊?