From 9dcc1ac8311bf2f323c157bac34096fc2a5c3900 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 12 Dec 2015 14:25:01 +0200 Subject: [PATCH] Cleanup fixes --- source/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/main.c b/source/main.c index f34acb5..1f1c629 100644 --- a/source/main.c +++ b/source/main.c @@ -684,6 +684,22 @@ void shutdown_screen(Compositor *compositor, CompositedScreen *screen) } } + for(i=0; inmonitors; ++i) + if(screen->monitors[i].enabled) + { + glDeleteBuffers(1, &screen->monitors[i].vertex_buffer); + glDeleteBuffers(1, &screen->monitors[i].index_buffer); + glDeleteVertexArrays(1, &screen->monitors[i].vertex_array); + } + + glDeleteBuffers(1, &screen->window_vertex_buffer); + glDeleteVertexArrays(1, &screen->window_vertex_array); + glDeleteFramebuffers(1, &screen->framebuffer); + glDeleteTextures(1, &screen->fb_texture); + glDeleteProgram(screen->program); + glDeleteShader(screen->shaders[0]); + glDeleteShader(screen->shaders[1]); + glXMakeContextCurrent(compositor->display, 0, 0, NULL); glXDestroyContext(compositor->display, screen->glx_context); glXDestroyWindow(compositor->display, screen->glx_window); -- 2.45.2