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

Method getTexture

Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:347–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

setOgreTextureMethod · 0.80
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
getByNameMethod · 0.45

Tested by

no test coverage detected