CCTextureRender saveToFile blank ??

CCSize screen = CCDirector::sharedDirector()>getWinSize;
CCRenderTexture *tex = CCRenderTexture::create, int);
tex
>setPosition(ccp(screen.width/2, screen.height/2));
tex~~>begin;
backgroundSprite~~>visit();
girlSprite~~>visit;
tex~~>end();

SocialShare::screenShot(tex);

and the screenShot use the jni to get the path in Android then call the method
tex->saveToFile(pathAndName.str().c_str(),kCCImageFormatJPEG);

I got a blank jpg… please help… this works on 2.0.3 but not works on 2.1.4

Which device you’re using? What happens if you’ll save file to PNG?

Sergey Shambir wrote:

Which device you’re using? What happens if you’ll save file to PNG?

I have follow the source code and know the reason that the file path is not correct. the CCRenderTexture will add a getWriablePath to the file path… I want the path is : /mnt/data/xxx will be changed to /mnt/data//data/data/xxx so I modify the method and get the right path ,then it worked!