[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 »

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.
User avatar
Kohedlo
Orc
Posts: 435
Joined: Fri Nov 27, 2009 3:34 pm
Location: Ukraine, Sumy
x 32
Contact:

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

Post by Kohedlo »

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

Code: Select all

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