I am using Ogre3d as render system in my game, but I need the screenshot feature, so I search some by google and I searched a screenshot code from ogre3d wiki, so I add it to my project. When I copy some OIS code from BaseApplication.cpp(generate by appwizard), I find the screenshot code from it, it looks like this:
Code: Select all
else if (arg.key == OIS::KC_SYSRQ) // take a screenshot
{
mWindow->writeContentsToTimestampedFile("screenshot", ".jpg");
}
But the SYSRQ key is not very normal, so I change the code to this:
Code: Select all
else if (arg.key == OIS::KC_INSERT) // take a screenshot
{
mWindow->writeContentsToTimestampedFile("screenshot", ".jpg");
}
Pic captured by the code: