CCRenderTexture Problems on Android


#1

I had made a screenshot by CCRender Texture, the details as below:

CCRenderTexture screenTexture = CCRenderTexture::renderTextureWithWidthAndHeight;
screenTexture~~>beginWithClear;
this~~>visit;
screenTexture->end;
hen the texture of this screenshot as the background of another scene, it will turn to this scene, the detais as below:
CCSprite
gameOverSprite =CCSprite::spriteWithTexture(screenTexture->getSprite()>getTexture);
GameHelp *gameOverScene = GameHelp::node;
gameOverScene
>addChild(gameOverSprite,–1,9);
CCDirector::sharedDirector()->pushScene(gameOverScene);

As far as now and everything goes well. But when it is under the android circumstance, if you press the home button( actually the game is not over)and back to game again,
there will be screen mess or the game will be crash. But everything operating normally under the IOS platform.

pls help!


#2

this may be a bug, it seems that when the rendered texture is used for a sprite and then go back to the background, it will cause the problem.

has anyone else met the problem or could give out some suggestions?


#3

RongHong,

It looks like the same issue I posted in http://www.cocos2d-x.org/boards/10/topics/4493 and someone else did in http://www.cocos2d-x.org/boards/10/topics/4795.

I hope someone comes with a solution/fix soon