-----------------------------------------------------------------------
| 91 | } |
| 92 | //----------------------------------------------------------------------- |
| 93 | TextureManager::ResourceCreateOrRetrieveResult TextureManager::createOrRetrieve( |
| 94 | const String &name, const String& group, bool isManual, ManualResourceLoader* loader, |
| 95 | const NameValuePairList* createParams, TextureType texType, int numMipmaps, Real gamma, |
| 96 | bool isAlpha, PixelFormat desiredFormat, bool hwGamma) |
| 97 | { |
| 98 | ResourceCreateOrRetrieveResult res = |
| 99 | Ogre::ResourceManager::createOrRetrieve(name, group, isManual, loader, createParams); |
| 100 | // Was it created? |
| 101 | if(res.second) |
| 102 | { |
| 103 | TexturePtr tex = static_pointer_cast<Texture>(res.first); |
| 104 | tex->setTextureType(texType); |
| 105 | tex->setNumMipmaps((numMipmaps == MIP_DEFAULT)? mDefaultNumMipmaps : |
| 106 | static_cast<uint32>(numMipmaps)); |
| 107 | tex->setGamma(gamma); |
| 108 | OGRE_IGNORE_DEPRECATED_BEGIN |
| 109 | tex->setTreatLuminanceAsAlpha(isAlpha); |
| 110 | OGRE_IGNORE_DEPRECATED_END |
| 111 | tex->setFormat(desiredFormat); |
| 112 | tex->setHardwareGammaEnabled(hwGamma); |
| 113 | } |
| 114 | return res; |
| 115 | } |
| 116 | //----------------------------------------------------------------------- |
| 117 | TexturePtr TextureManager::prepare(const String &name, const String& group, TextureType texType, |
| 118 | int numMipmaps, Real gamma, bool isAlpha, |
nothing calls this directly
no test coverage detected