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

Method createExactTexture

MyGUIEngine/src/MyGUI_Canvas.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 }
41
42 void Canvas::createExactTexture(int _width, int _height, TextureUsage _usage, PixelFormat _format)
43 {
44 int width = std::max(1, _width);
45 int height = std::max(1, _height);
46
47 destroyTexture();
48
49 mTexture = RenderManager::getInstance().createTexture(mGenTexName);
50 mTexture->setInvalidateListener(this);
51 mTexture->createManual(width, height, _usage, _format);
52
53 mTexManaged = true;
54
55 _setTextureName(mGenTexName);
56 correctUV();
57 requestUpdateCanvas(this, Event(true, true, mInvalidateData));
58 }
59
60 void Canvas::resize(const IntSize& _size)
61 {

Callers

nothing calls this directly

Calls 5

maxFunction · 0.85
EventClass · 0.85
setInvalidateListenerMethod · 0.80
createTextureMethod · 0.45
createManualMethod · 0.45

Tested by

no test coverage detected