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

Method loadFromFile

Platforms/OpenGLES/OpenGLESPlatform/src/MyGUI_OpenGLESTexture.cpp:293–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 }
292
293 void OpenGLESTexture::loadFromFile(const std::string& _filename)
294 {
295 destroy();
296
297 if (mImageLoader)
298 {
299 int width = 0;
300 int height = 0;
301 PixelFormat format = PixelFormat::Unknow;
302
303 void* data = mImageLoader->loadImage(width, height, format, _filename);
304 if (data)
305 {
306 createManual(width, height, TextureUsage::Static | TextureUsage::Write, format, data);
307 delete (unsigned char*)data;
308 }
309 }
310 }
311
312 void OpenGLESTexture::saveToFile(const std::string& _filename)
313 {

Callers

nothing calls this directly

Calls 1

loadImageMethod · 0.45

Tested by

no test coverage detected