Search code examples
androidcocos2d-android

How to save the layer as an image in COCOS2D android


I want to save all of the work done(every object on the screen) as ONE jpeg image in COCOS2D android.


Solution

  • Use the RenderTexture class and its saveBuffer method.

    Taking a screenshot is the same process as for the iPhone version (CCRenderTexture).