| 43 | } |
| 44 | |
| 45 | void StageView::destroy() { |
| 46 | if (fbo_ != 0) { |
| 47 | canvas_.glDeleteFramebuffers(1, &fbo_); |
| 48 | fbo_ = 0; |
| 49 | } |
| 50 | if (texture_ != 0) { |
| 51 | canvas_.glDeleteTextures(1, &texture_); |
| 52 | texture_ = 0; |
| 53 | } |
| 54 | width_ = 0; |
| 55 | height_ = 0; |
| 56 | } |
| 57 | |
| 58 | void StageView::ensure_size(int width, int height) { |
| 59 | if (width <= 0 || height <= 0) { |
nothing calls this directly
no test coverage detected