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

Method loadFromFile

Platforms/OpenGL/OpenGLPlatform/src/MyGUI_OpenGLTexture.cpp:319–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 }
318
319 void OpenGLTexture::loadFromFile(const std::string& _filename)
320 {
321 destroy();
322
323 if (mImageLoader)
324 {
325 int width = 0;
326 int height = 0;
327 PixelFormat format = PixelFormat::Unknow;
328
329 void* data = mImageLoader->loadImage(width, height, format, _filename);
330 if (data)
331 {
332 createManual(width, height, TextureUsage::Static | TextureUsage::Write, format, data);
333 delete[] (unsigned char*)data;
334 }
335 }
336 }
337
338 void OpenGLTexture::saveToFile(const std::string& _filename)
339 {

Callers

nothing calls this directly

Calls 1

loadImageMethod · 0.45

Tested by

no test coverage detected