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

@@ -30,7 +30,6 @@ void NodeStrokePreview::clone_finalize(Node* dest) const
void NodeStrokePreview::init_controls()
{
m_mesh.create();
m_sampler_linear.create();
m_sampler_linear_repeat.create(GL_LINEAR, GL_REPEAT);
m_sampler_mipmap.create();
@@ -470,3 +469,14 @@ void NodeStrokePreview::handle_resize(glm::vec2 old_size, glm::vec2 new_size)
draw_stroke();
}
void NodeStrokePreview::destroy_immediate()
{
Node::destroy_immediate();
m_rtt.destroy();
m_rtt_mixer.destroy();
m_tex.destroy();
m_tex_dual.destroy();
m_tex_background.destroy();
m_brush_shape.destroy();
}