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

Method loadFromFile

Platforms/OpenGL3/OpenGL3Platform/src/MyGUI_OpenGL3Texture.cpp:312–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310 }
311
312 void OpenGL3Texture::loadFromFile(const std::string& _filename)
313 {
314 destroy();
315
316 if (mImageLoader)
317 {
318 int width = 0;
319 int height = 0;
320 PixelFormat format = PixelFormat::Unknow;
321
322 void* data = mImageLoader->loadImage(width, height, format, _filename);
323 if (data)
324 {
325 createManual(width, height, TextureUsage::Static | TextureUsage::Write, format, data);
326 delete[] (unsigned char*)data;
327 }
328 }
329 }
330
331 void OpenGL3Texture::saveToFile(const std::string& _filename)
332 {

Callers

nothing calls this directly

Calls 1

loadImageMethod · 0.45

Tested by

no test coverage detected