From: Mikko Rasa Date: Sat, 12 Dec 2015 12:25:01 +0000 (+0200) Subject: Cleanup fixes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9dcc1ac8311bf2f323c157bac34096fc2a5c3900;p=geometrycompositor.git Cleanup fixes --- 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);