cocos2d x - cocos 2d x capture screenshot and display instantly in ios c++ -



cocos2d x - cocos 2d x capture screenshot and display instantly in ios c++ -

i want capture screenshot during game , and display captured image on app using cocos 2d-x v2.3 c++ version. how can possible ? please help me

you can capture screen shot using ccrendertexture , next code:

ccrendertexture* texture = ccrendertexture::create((int)visiblesize.width, (int)visiblesize.height); texture->setposition(ccp(visiblesize.width/2, visiblesize.height/2)); texture->begin(); ccdirector::shareddirector()->getrunningscene()->visit(); texture->end(); texture->savetofile("screenshot.png", kccimageformatpng);

but don't know how retrieve image here :) if 1 know please tell me.

ios cocos2d-x

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -