| 546 | } |
| 547 | |
| 548 | void ResourceManager::takeScreenshot(Ogre::RenderTarget* renderTarget) |
| 549 | { |
| 550 | static int screenShotCounter = 0; |
| 551 | |
| 552 | static std::locale loc(std::wcout.getloc(), new boost::posix_time::time_facet("%Y-%m-%d_%H%M%S")); |
| 553 | |
| 554 | std::ostringstream ss; |
| 555 | ss.imbue(loc); |
| 556 | ss << "ODscreenshot_" << boost::posix_time::second_clock::local_time() |
| 557 | << "_" << screenShotCounter++ << ".png"; |
| 558 | renderTarget->writeContentsToFile(getUserDataPath() + ss.str()); |
| 559 | } |
| 560 | |
| 561 | std::string ResourceManager::buildReplayFilename() |
| 562 | { |
no outgoing calls
no test coverage detected