]> git.tdb.fi Git - geometrycompositor.git/commitdiff
Cleanup fixes
authorMikko Rasa <tdb@tdb.fi>
Sat, 12 Dec 2015 12:25:01 +0000 (14:25 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 12 Dec 2015 12:25:01 +0000 (14:25 +0200)
source/main.c

index f34acb54885ac30a1e1d5ea18869f6aba83f5151..1f1c629216e24a058aaf61e80e63efbba8db01b0 100644 (file)
@@ -684,6 +684,22 @@ void shutdown_screen(Compositor *compositor, CompositedScreen *screen)
                }
        }
 
+       for(i=0; i<screen->nmonitors; ++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);