auto renderTexture = new CCRenderTexture();
renderTexture->initWithWidthAndHeight(1024, 1024, CCTexture2DPixelFormat::kCCTexture2DPixelFormat_RGBA8888);
renderTexture->begin();
...visit some sprites...
renderTexture->end();
renderTexture->saveBuffer(kCCImageFormatPNG, "image111.png");
After executing this code I get image “image111.png” with size 1024x1024, BUT only 640x960 is filled (I use retina mode). i.e. image is cropped by the size of viewport (960x640). How can I fix this issue? Is it possible?
Thanks for reply.
Yes, it seems, my problem and #511 are not the same problems.
In the topic http://www.cocos2d-x.org/boards/6/topics/6762
James Chen said:
>>Use the size the same as your screen pixel size will be better. Otherwise, the saved image outside the screen size will be the color you clear.
Here is my problem. I have CCRenderTexture with size 1024x1024, and drawing on CCRenderTexture is cropped to the device screen width and height (640x960). Is it possible to draw on CCRenderTexture without that cropping?