MCPcopy Create free account
hub / github.com/MyGUI/mygui / saveToFile

Method saveToFile

Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 6

lockFunction · 0.85
unlockFunction · 0.85
getWidthMethod · 0.45
getHeightMethod · 0.45
getFormatMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected