| 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 | { |
nothing calls this directly
no test coverage detected