[2.1]How to take in-game photos?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
MadnessOfMadara
Gnoblar
Posts: 1
Joined: Wed Aug 17, 2016 9:10 pm

[2.1]How to take in-game photos?

Post by MadnessOfMadara » Sat Apr 15, 2017 11:03 pm

How to take in-game photos? I want to make a camera that takes in-game pics like in Pokemon Snap and Zelda: Breath of the Wild. Honestly all I need to know is how to access a frame buffer's data. Once I get that, I can use a codec to save the image in whatever file format I want.
0 x

User avatar
Kohedlo
Orc
Posts: 435
Joined: Fri Nov 27, 2009 3:34 pm
Location: Ukraine, Sumy
x 11
Contact:

Re: [2.1]How to take in-game photos?

Post by Kohedlo » Sun Apr 30, 2017 10:25 pm

simple call : rwindow->writeContentsToTimestampedFile(string,string);

Code: Select all

Ogre::Root::getSingletonPtr()->getRenderTarget(MapManager::getSingleton().currentRenderTargetName)->writeContentsToTimestampedFile("Screenshots/"+CfgManager::getSingleton().current_game_project+"_", ".jpg");
0 x
c++ game developer.
current project: Imperial Game Engine 2.5
Image

Post Reply