| 345 | } |
| 346 | |
| 347 | ITexture* OgreRenderManager::getTexture(const std::string& _name) |
| 348 | { |
| 349 | if (_name.empty()) |
| 350 | return nullptr; |
| 351 | MapTexture::const_iterator item = mTextures.find(_name); |
| 352 | if (item == mTextures.end()) |
| 353 | { |
| 354 | Ogre::TexturePtr texture = (Ogre::TexturePtr)Ogre::TextureManager::getSingleton().getByName( |
| 355 | _name, |
| 356 | OgreDataManager::getInstance().getGroup()); |
| 357 | if (texture) |
| 358 | { |
| 359 | ITexture* result = createTexture(_name); |
| 360 | static_cast<OgreTexture*>(result)->setOgreTexture(texture); |
| 361 | return result; |
| 362 | } |
| 363 | return nullptr; |
| 364 | } |
| 365 | return item->second; |
| 366 | } |
| 367 | |
| 368 | bool OgreRenderManager::isFormatSupported(PixelFormat _format, TextureUsage _usage) |
| 369 | { |
nothing calls this directly
no test coverage detected