- Timestamp:
- Mar 14, 2011, 5:36:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/src/modules/designtools/ScreenshotManager.h
r7163 r8076 40 40 ~ScreenshotManager(); 41 41 42 /* Creates a screenshot with the given camera. 43 * @param camera Pointer to the camera "looking at" the scene of interest 44 * @param fileName the filename of the screenshot file. 45 */ 42 /** 43 * @briefCreates a screenshot with the given camera. 44 * @param camera Pointer to the camera "looking at" the scene of interest 45 * @param fileName the filename of the screenshot file. 46 */ 46 47 void makeScreenshot() const; 47 48 48 static void makeScreenshot_s() 49 { getInstance().makeScreenshot(); } 49 //static void makeScreenshot_s() 50 // { getInstance().makeScreenshot(); } 51 static void makeScreenshot_s(unsigned int size) 52 { getInstance().setGridSize(size); getInstance().makeScreenshot(); } 53 54 void setGridSize(unsigned int size) 55 { 56 this->mGridSize_ = size; 57 uint8_t* data_ = new uint8_t[(this->mWindowWidth_ * this->mGridSize_) * (this->mWindowHeight_ * this->mGridSize_) * 3]; 58 this->mFinalPicturePB_ = Ogre::PixelBox(this->mWindowWidth_ * this->mGridSize_, this->mWindowHeight_ * this->mGridSize_, 1, Ogre::PF_B8G8R8, data_); 59 } 50 60 51 61 protected: 52 62 static std::string getTimestamp(); 53 63 54 std::string mFileExtension ;55 unsigned int mGridSize , mWindowWidth, mWindowHeight;56 bool mDisableOverlays ;64 std::string mFileExtension_; 65 unsigned int mGridSize_, mWindowWidth_, mWindowHeight_; 66 bool mDisableOverlays_; 57 67 //temp texture with current screensize 58 Ogre::TexturePtr mTempTex ;59 Ogre::RenderTexture* mRT ;60 Ogre::HardwarePixelBufferSharedPtr mBuffer ;68 Ogre::TexturePtr mTempTex_; 69 Ogre::RenderTexture* mRT_; 70 Ogre::HardwarePixelBufferSharedPtr mBuffer_; 61 71 //PixelBox for a large Screenshot, if grid size is > 1 62 Ogre::PixelBox mFinalPicturePB ;72 Ogre::PixelBox mFinalPicturePB_; 63 73 uint8_t* data_; 64 74
Note: See TracChangeset
for help on using the changeset viewer.