| 34 | } |
| 35 | |
| 36 | void OgreTexture::saveToFile(const std::string& _filename) |
| 37 | { |
| 38 | Ogre::uchar* readrefdata = static_cast<Ogre::uchar*>(lock(TextureUsage::Read)); |
| 39 | |
| 40 | Ogre::Image img; |
| 41 | img = img.loadDynamicImage(readrefdata, mTexture->getWidth(), mTexture->getHeight(), mTexture->getFormat()); |
| 42 | img.save(_filename); |
| 43 | |
| 44 | unlock(); |
| 45 | } |
| 46 | |
| 47 | void OgreTexture::setShader(const std::string& _shaderName) |
| 48 | { |