CCRenderTexture question

CCRenderTexture question
0.0 0


Hello, I have to render a few dynamic-generated sprites using render texture.
In cycle I do:

for (int i=0; i < N; ++i)
auto* rt = CCRenderTexture::create(1024, 1024);
// Some drawings…
CCSprite* child = CCSprite::createWithTexture(rt~~>getSprite~~>getTexture);
// —
child~~>setAnchorPoint(ccp(0, 0));
this~~>addChild(child, 2);

This works nice but only first iteration. If I do begin with clear and some color, I see the textures one after another in a row but only first one is with a content.
So any sprite/texture after first iteration of cycle becomes empty.

Maybe, there are some limitation for render textures rendering or all the sprites in cycles uses the same texture?