Hello! Please help me.
I want to make screenshot every frame to make a video (gif, mp4) animation when player will lose but the most fast way to do the screenshot is 30 ms! It’s very very slow for my objective!
RenderTexture is not working for me because I’m using Sprite3D objects and many cameras so RenderTexture is not working.
You’ll have to look into high-performance screenshot / screen to video solutions that exist out there. I would suggest looking into the platform-specific record game APIs. Next you could look at an sdk/plugin like Kamcord - https://www.kamcord.com/. Finally you can read up on the couple blogs of similar companies like Kamcord on their implementations.
If you want to handle this yourself you can do async screenshots, so you could just have the callback save out the image to a file. Then post-process the images into a gif/video. Beyond that you’ll have to use the not common OpenGL APIs around pixel buffers and stuff.
Hi. RenderTexture with small resolution did the trick! In the main thread! But I did not save results to the file otherwise I store it in the memory and create gif from memory so it works fast.
If you guys @catch_up@energyy wants I can share my solution. Because I don’t think that this is should be a part of Framework coz it’s very specific feature.
Also, I feel that this can be a part of framework, as just like single screen shot capturing, some people might love having this. Who knows this might shape the future of cocos2d-x and more people might start using it… This feature looks gimmick but it’s not just that much.