截屏当前窗口

auto pRendertex = RenderTexture::create(960,640);
	pRendertex->beginWithClear(0, 0, 0, 1.0f);
	Director::getInstance()->getRunningScene()->visit();
	pRendertex->end();
	pRendertex->saveToFile("E:\\aaa.jpg", Image::Format::JPG);
默认位置在C:\Users\Lenovo\AppData\Local\hello\

你可能感兴趣的:(截屏当前窗口)