I’m having problem to save an in-game screenshot in iPad3.
The saved picture, all black.
But its working properly in iPad 1 and iPhone 3GS.
I am using Cocos2dx 2.03. iOS 6.
Did you enabled retina?
May be you should checkout the value of size.
No, in appdelegate the retina setter is still in comment tag
I’ve log the size from CCDirector::sharedDirector()->getWinSize() and it return 1024 x 768
I have tried to save the screenshot in iPad 6.0 simulator, and it works fine.
I found some people have this same problem.
I tried to port it to c+*, but i dont have a clue the type that equivalent to UIImage in cocos2dx. Any clue?
<pre> (UIImage*) screenshotWithStartNode:startNode
{
.nextDeltaTimeZero = YES;
CGSize winSize = .winSize;
CCRenderTexture** rtx =
[CCRenderTexture renderTextureWithWidth:winSize.width
height:winSize.height];
[rtx begin];
[startNode visit];
[rtx end];
I found some people have this same problem.
I tried to port it to c++, but i dont have a clue the type that equivalent to UIImage in cocos2dx. Any clue?
>
[…]
>
You can call it like this
[…]
You can use CCImage.
Diori Cergy Castali wrote:
> I found some people have this same problem.
> I tried to port it to c++, but i dont have a clue the type that equivalent to UIImage in cocos2dx. Any clue?
>
> […]
>
> You can call it like this
> […]
I tried to replace the UIimage with the CCImage to this function, but the type is not compatible.
Is there any function in cocos2dx is equivalent to “UIImageWriteToSavedPhotosAlbum()” ?