}
}
+ 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);