The screenshot feature has been included in the ogre appwiz

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
randomcode
Halfling
Posts: 53
Joined: Wed Nov 11, 2015 11:31 am
Location: People's Republic of China
x 5
Contact:

The screenshot feature has been included in the ogre appwiz

Post by randomcode »

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:
Image
OpenMB(Open Source Mount&Blade Series)
https://github.com/cookgreen/OpenMB
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: The screenshot feature has been included in the ogre app

Post by Kojack »

randomcode wrote:But the SYSRQ key is not very normal,
SYSRQ is the name of the printscreen key, fairly common for screenshots. :)
User avatar
randomcode
Halfling
Posts: 53
Joined: Wed Nov 11, 2015 11:31 am
Location: People's Republic of China
x 5
Contact:

Re: The screenshot feature has been included in the ogre app

Post by randomcode »

Kojack wrote:
randomcode wrote:But the SYSRQ key is not very normal,
SYSRQ is the name of the printscreen key, fairly common for screenshots. :)
That's right, but i can't find this key on keyboard, so I just modify it.
OpenMB(Open Source Mount&Blade Series)
https://github.com/cookgreen/OpenMB
Post Reply