free resources on app destruction

This commit is contained in:
2019-02-24 12:31:53 +01:00
parent 420e0a8c2a
commit 3d1412aee2
13 changed files with 66 additions and 6 deletions

View File

@@ -13,6 +13,8 @@
class Layer
{
public:
//Layer() = default;
//Layer(const Layer&) = delete;
RTT m_rtt[6];
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
bool m_dirty_face[6] = SIXPLETTE(false);
@@ -223,6 +225,8 @@ public:
std::vector<Layer::Snapshot> m_layers_snapshot;
Canvas() { I = this; }
~Canvas() { destroy(); }
void destroy();
bool create(int width, int height);
void resize(int width, int height);
void layer_remove(int idx);