From b07de643ab3b077183a29c04d19fd0f8528c5147 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 11 Oct 2019 22:18:56 +0000 Subject: [PATCH] render: Try to do proper cleanup on egl --- src/render.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/render.c b/src/render.c index 3a04272..02cccc4 100644 --- a/src/render.c +++ b/src/render.c @@ -271,9 +271,13 @@ void gl_render(void) void renderer_destroy(struct renderer* self) { + glDeleteProgram(self->dmabuf_shader_program); + glDeleteProgram(self->texture_shader_program); + eglMakeCurrent(self->display, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT); eglDestroySurface(self->display, self->surface); eglDestroyContext(self->display, self->context); - glDeleteProgram(self->dmabuf_shader_program); + eglTerminate(self->display); } int renderer_init(struct renderer* self, uint32_t width, uint32_t height)