auto ac = Sequence::create(DelayTime::create(3), CallFunc::create([=]() 
    {
        auto rt = RenderTexture::create(Director::getInstance()->getWinSize().width,
            Director::getInstance()->getWinSize().height,
            Texture2D::PixelFormat::RGBA8888);
        rt->beginWithClear(0.0f, 1.0f, 0.0f, 0.0f);
        Director::getInstance()->getRunningScene()->visit();
        rt->end();
        auto ret = rt->saveToFile("r2t.png");
        printf("%d\n",ret);
    }),nullptr);

    this->runAction(ac);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2022-02-17
  • 2021-08-01
  • 2021-11-12
相关资源
相似解决方案