cocos2d,CCRenderTexture的小疑点

cocos2d,CCRenderTexture的小问题-(CCSprite *)spriteWithColor:(ccColor4F)bgColor textureSize:(float)t

cocos2d,CCRenderTexture的小问题
-(CCSprite *)spriteWithColor:(ccColor4F)bgColor textureSize:(float)textureSize {

// 1: Create new CCRenderTexture
CCRenderTexture *rt = [CCRenderTexture renderTextureWithWidth:textureSize height:textureSize];

// 2: Call CCRenderTexture:begin
[rt beginWithClear:bgColor.r g:bgColor.g b:bgColor.b a:bgColor.a];

// 3: Draw into the texture
// We'll add this later

// 4: Call CCRenderTexture:end
[rt end];

// 5: Create a new Sprite from the texture
return [CCSprite spriteWithTexture:rt.sprite.texture];

}
最后那个rt.sprite.texture如果用C++写,应该怎么改,谢谢大神啊

[解决办法]
CCSprite::spriteWithTexture(rt->getSprite()->getTexture());